Comparative study of air quality data of Senegal(Dakar) and Cameroon(Douala)
# DataPreprocessing – Air Quality Dakar vs Douala
This project performs data preprocessing and exploratory analysis on **air quality measurements** for two African coastal cities:
- **Dakar, Senegal**
- **Douala, Cameroon**
The aim is to transform raw data from the OpenAQ platform into a clean, well‑structured format and then compare air quality indicators between the two locations over a common time window (23 September 2024 to 27 October 2024).
---
## Context
Air quality is a critical environmental and public health issue, especially in rapidly growing urban areas.
This project focuses on Dakar and Douala, using data collected by **AirGradient** sensors and accessed via OpenAQ. The work was carried out at **AIMS‑Senegal** by Group 5 “Open Air Quality”, supervised by Dr. Rockefeller (Stellenbosch University).
---
## Data Sources
The notebook uses two CSV files (downloaded from OpenAQ):
- `data/air-qualdakarsept_oct.csv` – measurements for Dakar
- `data/air_qualdoualasept_oct.csv` – measurements for Douala
Each raw dataset contains, among others, the following columns:
- `location_id`, `location_name`
- `sensor_id` (in the original API responses)
- `parameter` (type of pollutant or meteorological variable)
- `value`, `unit`
- `datetimeUtc`, `datetimeLocal`, `timezone`
- `latitude`, `longitude`
- `owner_name`, `provider`
- Mobility/monitor flags
---
## Preprocessing Objectives
The preprocessing in the notebook is designed to:
1. **Transform raw, long-format measurements** into a tidy **wide-format** dataset where each parameter becomes a separate column.
2. **Align temporal information** (local datetime, date, and time) and select a common analysis window for both cities.
3. **Select relevant air quality and meteorological variables** for comparative analysis.
4. Prepare data structures that are convenient for plotting time series and computing summary statistics.
---
## Preprocessing Steps
### 1. Load Raw Data
For each city, the notebook:
- Read …