Skip to content

cwimpy/rurality-app

Repository files navigation

🌾 Rurality.app

Discover how rural any location in the United States is using comprehensive data analysis.

Live Demo License React

🎯 What is Rurality.app?

Rurality.app provides a comprehensive Rural Index Score for any location in the United States by analyzing multiple data sources and factors that define rural vs. urban characteristics. Whether you're a researcher, policy maker, real estate professional, or just curious about your hometown, Rurality.app gives you data-driven insights into the rural nature of any place.

✨ Features

πŸ” Smart Location Analysis

  • Search any city, county, or ZIP code in the US
  • GPS-powered current location detection
  • Real-time geocoding with OpenStreetMap

πŸ“Š Evidence-Based Rural Index

Our methodology builds on the USDA Rural-Urban Continuum Codes (the federal gold standard) enhanced with real-time data:

  • USDA Classification (50%) - Official federal rurality codes
  • Population Density (25%) - People per square mile from US Census
  • Distance to Metro Areas (15%) - Calculated proximity to cities of various sizes
  • Broadband Access (10%) - Internet availability when data is available

See detailed methodology with data sources and citations.

πŸ“ˆ Historical Trends

  • 5-year historical rurality trends
  • Identify changing rural/urban patterns
  • Export trend data for research

πŸ—ΊοΈ Interactive Mapping

  • Real-time location mapping
  • Rurality heat map overlays
  • Multiple data layer views

πŸ”„ Location Comparison

  • Compare up to 5 locations side-by-side
  • Detailed metric breakdowns
  • Export comparison reports

πŸ“± Mobile-First Design

  • Responsive design for all devices
  • Touch-optimized interface
  • Offline capability (coming soon)

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm
  • Modern web browser

Installation

# Clone the repository
git clone https://github.com/cwimpy/rurality-app.git
cd rurality-app

# Install dependencies
npm install

# Start development server
npm start

Open http://localhost:3000 to view it in your browser.

Environment Variables (Optional)

Create a .env file for enhanced functionality:

# US Census Bureau API Key (optional - increases rate limits)
REACT_APP_CENSUS_API_KEY=your_census_api_key

# Mapbox API Key (for advanced mapping features)
REACT_APP_MAPBOX_TOKEN=your_mapbox_token

# Google Places API (for enhanced geocoding)
REACT_APP_GOOGLE_PLACES_KEY=your_google_places_key

πŸ—οΈ Tech Stack

Frontend

  • React 18 - Modern UI framework
  • Tailwind CSS - Utility-first styling
  • Lucide React - Beautiful icons
  • OpenStreetMap - Free mapping service

Data Sources

  • USDA Economic Research Service - Rural-Urban Continuum Codes (2013)
  • US Census Bureau API - Population and demographic data (2022)
  • US Census Bureau - Metropolitan Statistical Areas (2020)
  • FCC Broadband Data Collection - County-level coverage at β‰₯100/20 Mbps (J25 filing, June 2025)
  • OpenStreetMap Nominatim - Free geocoding service

All sources are cited in METHODOLOGY.md

Deployment

  • Vercel - Serverless deployment platform
  • GitHub Actions - Automated CI/CD

πŸ“Š Rural Index Methodology

The Rural Index Score (0-100) uses a hybrid approach that prioritizes official federal classifications:

Rural Index = (USDA RUCC Γ— 0.50) +
              (Population Density Γ— 0.25) +
              (Distance to Metros Γ— 0.15) +
              (Broadband Access Γ— 0.10)*

* When broadband data unavailable, weight redistributes to other factors

Why this approach?

  • USDA RUCC is the federal government's official rurality measure, developed by researchers and used for policy
  • We enhance it with granular, real-time data for more detailed insights
  • All data sources are cited, all calculations are transparent
  • No placeholder or fabricated data

Score Classifications

  • 80-100: Very Rural 🌾
  • 60-79: Rural 🏞️
  • 40-59: Mixed 🏘️
  • 20-39: Suburban 🏑
  • 0-19: Urban πŸ™οΈ

See METHODOLOGY.md for complete details, data sources, and academic citations.

πŸ”§ Development

Available Scripts

# Start development server
npm start

# Build for production
npm run build

# Run tests
npm test

# Lint code
npm run lint

# Format code
npm run format

Project Structure

rurality-app/
β”œβ”€β”€ public/                    # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”œβ”€β”€ data/                 # USDA codes, metro data
β”‚   β”œβ”€β”€ services/             # API and calculation services
β”‚   β”œβ”€β”€ utils/                # API utilities, rate limiting, caching
β”‚   └── App.js                # Main application component
β”œβ”€β”€ METHODOLOGY.md            # Detailed methodology documentation
β”œβ”€β”€ DEPLOYMENT.md             # Deployment guide
└── PRODUCTION_READINESS.md   # Production checklist

🌍 API Documentation

Rurality Score Endpoint (Coming Soon)

// GET /api/rurality?location={location}
const response = await fetch('/api/rurality?location=Yellowstone County, MT');
const data = await response.json();

// Response format
{
  "location": "Yellowstone County, MT",
  "coordinates": { "lat": 45.7833, "lng": -108.5007 },
  "ruralityScore": 72,
  "classification": "Rural",
  "metrics": {
    "populationDensity": { "value": 37.2, "score": 85 },
    "distanceToUrban": { "value": 45, "score": 78 },
    // ... additional metrics
  },
  "lastUpdated": "2024-01-15T10:30:00Z"
}

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Areas We Need Help

  • Additional data source integration
  • Mobile app development (React Native)
  • Advanced mapping features
  • Data visualization improvements
  • API rate limiting and caching
  • Accessibility improvements

πŸ“ˆ Roadmap

Phase 1: Foundation βœ…

  • Basic UI and design
  • Location search functionality
  • Mock rurality calculations
  • Local development setup

Phase 2: Real Data Integration βœ…

  • USDA Rural-Urban Continuum Codes integration
  • US Census Bureau API integration
  • Evidence-based calculation methodology
  • Complete RUCC database (all 3,142 counties)
  • FCC broadband integration (BDC, β‰₯100/20 Mbps, county-level)
  • Historical trend data collection

Phase 3: Advanced Features πŸ“‹

  • User accounts and saved locations
  • Advanced mapping with Mapbox
  • PDF report generation
  • API rate limiting and caching
  • Mobile app development

Phase 4: Scale & Polish 🎯

  • Performance optimization
  • Advanced analytics
  • Enterprise features
  • White-label solutions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • US Census Bureau for providing comprehensive demographic data
  • USDA Economic Research Service for rural-urban classification codes
  • OpenStreetMap contributors for mapping data
  • React and Tailwind CSS communities for excellent tools

πŸ“§ Contact


Built with ❀️ for rural communities and researchers everywhere.

About

This is my the source code for rurality.app

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors