Polluwatch: Real-Time Air Quality Monitoring for Kenya

- 123
- locations monitored
- 8
- pollutants tracked
- 1 hr
- refresh cadence
- 3
- ML models in the forecast stack
Air quality data for Kenya existed, but it was trapped in raw API responses and spreadsheets. Environmental officers, health workers, urban planners and the public had no shared, real-time view of what they were breathing, and no practical way to turn a number such as PM2.5 = 35 into a decision.
Built Polluwatch: a Django REST API that collects hourly readings for 123 Kenyan towns and cities from OpenWeather and exposes live, historical, station and monthly/yearly endpoints with token auth. I led the backend and AI work: the data model, hourly ingestion scheduler, API and auth layer, the scikit-learn pipeline that removes outliers and trains stacked regression models to forecast AQI, and PolluBot, a Gemini-powered assistant that answers questions in English and Kiswahili. The React dashboard was a shared effort; I built the chatbot interface and several views, integrated the API, and supported the frontend at several points. I then prepared the platform for production with Docker, environment-based configuration and a persistent database.
Polluwatch turns 123 locations and eight pollutants into a single public dashboard. Instead of chasing raw API output, a visitor can check live conditions, compare historical trends, read a forecast and ask a plain-language question. The platform refreshes automatically, giving communities and planners a shared evidence base for air-quality decisions.
The hardest part was not collecting data; it was making it legible. A clear AQI card or a plain-language answer changes what a non-technical user can do with the same number. I also learned that production readiness is a design constraint: centralising API configuration, moving secrets out of source control, containerising the services and keeping the database persistent were as important as the features themselves.


Gift