Inspiration
Every winter, Lahore faces severe smog crises with hazardous air quality levels that shut down schools and increase hospital admissions. During the monsoon season, rapid urbanization causes sudden urban flash floods and waterlogging.
Government authorities such as the EPA, WASA, Rescue 1122, and Traffic Police, as well as citizens, often rely on limited point sensors and reactive measures. We built AeroCast for the Smart City Hackathon Lahore (Code for Pakistan) to provide proactive, hyper-local risk intelligence across the entire district before hazards happen.
What It Does
AeroCast is an AI-driven, multi-hazard urban risk intelligence platform for Lahore:
- 241 Computational Zones: Divides Lahore District into 241 high-resolution grid zones (3km x 3km each) for localized analysis.
- 24-Hour Smog & AQI Forecast: Uses machine learning (XGBoost) to predict PM2.5 levels 24 hours in advance, including extreme smog spike probabilities and confidence intervals.
- Universal Kriging Geostatistics: Estimates air quality for zones without physical air monitors using satellite greenery (NDVI) and road density.
- Urban Heat Island (UHI) Risk: Measures urban thermal vulnerability using temperature, concrete density, vegetation, and population exposure.
- Flash Flood Runoff Engine: Calculates waterlogging risk and estimated water depth based on 24-hour rainfall forecasts, elevation, and terrain slope.
- NASA Satellite Fire Tracking: Monitors active agricultural stubble burning and downwind smoke movement using NASA FIRMS satellite data.
- AI Copilot & Policy Simulator: Powered by Google Gemini 2.5 Flash to generate practical action plans for public departments and simulate policy interventions like traffic rationing or misting cannons.
- Trilingual Early Warnings: Automatically dispatches alerts in English, Urdu, and Roman Urdu.
How We Built It
- Data Ingestion: Automated data collection from OpenAQ, Open-Meteo, Copernicus DEM (elevation and slope), Sentinel-2 satellite data, NASA FIRMS fires, and WorldPop population datasets.
- Machine Learning: Trained XGBoost hurdle models and spatial Kriging engines on multi-year historical datasets.
- Backend: Built an asynchronous REST API using Python 3.12, FastAPI, and Pydantic v2.
- Frontend Dashboard: Developed a clean Web GIS command center using HTML5, CSS3, JavaScript, Leaflet.js maps, and Chart.js forecast charts.
Challenges We Faced
- Predicting Extreme Smog Spikes: Traditional models often smooth out sudden high-pollution spikes. We solved this with a two-stage hurdle machine learning architecture that specializes in extreme events.
- Sensor Coverage Gaps: Physical sensors are only located in specific parts of the city. We used spatial Kriging geostatistics to calculate accurate estimates for unmonitored zones.
- Real-time Map Performance: Delivering detailed polygons and multi-hazard data for 241 zones simultaneously required building a fast caching layer and optimized GeoJSON pipeline.
Accomplishments We Are Proud Of
- High Forecast Accuracy: Achieved 92% recall on severe smog events during holdout validation.
- Reliable Codebase: Implemented 96 automated tests covering the data pipeline, machine learning models, and API endpoints.
- Practical Civic Tool: Created a ready-to-use situational dashboard that presents complex environmental data in an easy-to-understand interface.
What We Learned
- How to combine satellite imagery, weather data, and machine learning for environmental modeling.
- How to connect Generative AI models like Gemini with real-time numerical GIS data for actionable governance.
- Designing responsive, high-performance web maps for civic decision-makers.
What Is Next for AeroCast
- Connecting low-cost IoT sensor networks across Lahore.
- Expanding the platform to other major Pakistani cities including Karachi, Faisalabad, and Rawalpindi.
- Developing a mobile application for citizens to receive localized health advisories.
Built With
- fastapi
- pykrige
- python
- xgboost
Log in or sign up for Devpost to join the conversation.