Logo Lanfrica

sheldonmainye/Air-Quality-Project-

Domain:

environment and energy

Record type:

project
Creator:
she
Host:
An air quality project that seeks to compare air quality trends between the cities of Nairobi, Mombasa and Kisumu ## Air Quality Monitoring in Kenyan Cities 🏙 🇰🇪 ## Project Overview This project focuses on the **analysis and visualization of air quality data** for three major Kenyan cities: **Nairobi**, **Mombasa**, and **Kisumu**. Using real-time data from the **OpenWeather API**, we explore pollution trends, conduct statistical and machine learning analysis, and create an interactive **Dash** web dashboard. ## Google Colab Notebook Analysis The project was carried out in a Jupyter Notebook, which was rendered for interactive exploration and analysis. The following key components were analyzed: 1. **Air Quality Analysis**: - Conversion of timestamps. - Extraction of pollutant concentrations for different cities. 2. **Data Visualization**: - Various plots and figures were created using **Matplotlib**, **Plotly**, and **Seaborn**. - Detailed comparison graphs for pollutants across cities and over time. --- ## Dashboard Visualization (Rendered in Google Colab Notebook) I built an **interactive dashboard** using `Dash`: - Select city, month, and date range - View daily pollutant levels over time - Compare monthly pollutant averages - Explore trends and pollutant behavior > Screenshots of Dashboard: ## Machine Learning Insights ### 1. Classification (AQI Levels) - Used `main.aqi` to classify air quality as `Good`, `Moderate`, `Unhealthy`, etc. - Algorithms: Decision Trees, Random Forests - Input features: pollutant concentrations (`co`, `no2`, `pm2_5`, etc.) ### 2. Clustering Analysis - Applied **KMeans** and **DBSCAN** to find pollution pattern clusters by time and location - Helped identify peak pollution hours and typical pollutant profiles per city ### 3. Anomaly Detection - Used **Multivariate Outlier Detection** and **AUC Score** methods - Detected unusual spikes in pollutants like `PM₂.₅` and `CO` linked to industrial or traffic events --- ## Technologies Used - **Google Colab Notebook**: For interactive analysis and visualization - **Dash / Plotly …