Air quality analysis in African cities.
# Air Quality Prediction for African Cities: A Data-Driven Public Health Solution
> Predicting PM2.5 levels 24-48 hours in advance across four African cities to enable proactive public health interventions.
---
## Table of Contents
* Executive Summary
* Business Context & Problem Statement
* Dataset & Data Understanding
* Analytical Approach
* Technical Implementation
* Results & Model Performance
* Geographic Performance Analysis
* Business Impact & Recommendations
* MLOps Implementation
* Limitations & Future Work
* Installation & Usage
* Project Structure
* Authors
---
## Executive Summary
Air pollution is responsible for over **7 million premature deaths annually** worldwide, with sub-Saharan Africa experiencing some of the fastest increases in pollution levels due to rapid urbanization. This project delivers a machine learning pipeline capable of predicting PM2.5 concentrations across four African cities (Lagos, Nairobi, Kampala, Bujumbura) with **17.3 µg/m³ average error**, enabling authorities to issue early warnings 24-48 hours before critical pollution episodes.
**Key Achievements:**
- 53.6% variance explained (R²) using XGBoost, significantly outperforming linear baselines
- Geographic generalization validated through strict cross-city validation preventing data leakage
- Actionable accuracy: prediction errors within WHO air quality guideline thresholds
- Production-ready pipeline with full MLflow experiment tracking and model registry
**Business Value:** Early pollution forecasts enable targeted public health interventions (school closures, traffic restrictions, vulnerable population alerts) that can reduce emergency room visits by an estimated 15-20% during peak pollution events.
---
## Business Context & Problem Statement
### The Public Health Crisis
Particulate Matter 2.5 (PM2.5) — fine particles smaller than 2.5 micrometers — penetrates deep into lungs and bloodstreams, causing cardiovascular diseases, respiratory infections, and p …