Predict PM 2.5 readings for air-quality in Nairobi and Tanzania
#WORLD QUANT UNIVERSITY PROJECT
# 🌍 Air Quality Prediction in Nairobi and Dar es Salaam
## đź’ˇ Project Goal
Developed a time-series forecasting model to predict **PM 2.5 readings** throughout the day for key stations in **Nairobi, Kenya, and Dar es Salaam, Tanzania**. The objective was to improve forecasting accuracy over a naive baseline, providing essential air quality insights for public health and environmental monitoring. Accurate PM 2.5 forecasting enables city health departments to issue timely air quality warnings, potentially reducing
respiratory health incidents in densely populated urban areas.
## 📊 Key Results
The final model significantly outperformed the naive baseline prediction.
* **Baseline Mean Absolute Error (MAE):** `4.053`
* **Final Model Mean Absolute Error (MAE):** `3.97`
* *Result:*The model achieved an accuracy improvement of approximately **2.05%** over the simple persistence model, demonstrating effective time-series analysis and model selection.
* Final Model MAE: 3.97 vs Baseline MAE: 4.053 Achieved lower prediction error using ARIMA with walk-forward validation on real-world sensor data
## 🛠️ Methodology and Techniques
This project involved a comprehensive machine learning and data engineering workflow:
### 1. Data Wrangling & Preparation
* **Source:** Data was sourced from **openAfrica**.
* **Database:** Used **MongoDB** to efficiently store, query, and wrangle the time-series data. This demonstrated competency with NoSQL database management for large datasets.
* **Preprocessing:** Handled missing values, standardized timestamps, and aggregated readings to prepare the data for time-series modeling.
### 2. Time Series Modeling
* **Exploratory Data Analysis (EDA):** Used **Autocorrelation (ACF) and Partial Autocorrelation (PACF) plots** to identify dependency in the time series data.
* **Models Explored:**
* Linear Regression with Time-Series Features (as a benchmark)
* **Autoregressive (AR) Models**
* **Autoregressive Moving Averag …