dhaka-aqi
Air-quality monitoring and next-hour PM2.5 forecasting for Dhaka, with a live dashboard.
source ↗2026

What it is
A pipeline from public sensor data to a forecast. It pulls PM2.5 readings for Dhaka from the OpenAQ API, converts them to the US EPA 2024 AQI, trains a next-hour model and serves everything in a dashboard.
How it works
- Data: 4,280 hourly observations, cleaned (error codes, gaps, outliers) onto a regular hourly grid.
- Model: hour, weekday, month and lagged readings feed a linear model, chosen over a random forest on held-out data. It scores R² 0.74 on 852 unseen hours.
- Forecast: up to 72 hours ahead, feeding each prediction back in as the next input.
- Dashboard: Flask and Chart.js, with live readings when an API key is set and a bundled snapshot otherwise.

