Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Air Quality Intelligence Dashboard

A machine learning-powered dashboard for analyzing, predicting, and exploring Air Quality Index (AQI) trends across major Indian cities.

Built using Python, XGBoost, Streamlit, Plotly, and Scikit-Learn, the project helps users understand air pollution patterns, identify key AQI drivers, and simulate environmental interventions through interactive visualizations.


📌 Project Overview

Air pollution is one of the most critical environmental challenges affecting public health in urban areas.

This project aims to:

  • Analyze historical AQI and pollutant data from Indian cities.
  • Build a machine learning model to predict AQI.
  • Identify the most influential pollution factors.
  • Provide interactive visualizations and insights.
  • Simulate "what-if" pollution scenarios to estimate AQI changes.

🚀 Features

📈 City Insights

  • Select any available city.

  • View predicted AQI using the trained ML model.

  • AQI gauge visualization.

  • AQI category classification:

    • Good
    • Satisfactory
    • Moderate
    • Poor
    • Very Poor
    • Severe
  • 90-day AQI trend analysis.

🔍 AQI Drivers Analysis

  • Feature importance visualization.
  • Identification of major pollutants affecting AQI.
  • PM2.5 sensitivity analysis.
  • Interactive plots for model interpretation.

🧪 Scenario Simulator

Users can simulate pollution control measures by adjusting:

  • PM2.5 concentration
  • PM10 concentration
  • NO₂ concentration

The dashboard then predicts:

  • Updated AQI
  • AQI category
  • Health advisory

🧠 Machine Learning Pipeline

Data Preprocessing

  • Removed records with missing AQI values.
  • Filled missing pollutant values using city-wise median imputation.
  • Encoded city names using Label Encoding.
  • Created cleaned dataset for modeling.

Models Evaluated

  • Linear Regression
  • Random Forest Regressor
  • XGBoost Regressor

Final Model

✅ XGBoost Regressor

Selected based on superior predictive performance.


📊 Exploratory Data Analysis (EDA)

The project includes:

EDA Phase 1

  • Data cleaning
  • Missing value handling
  • Pollutant distribution analysis
  • City-wise AQI exploration

EDA Phase 2

  • Model comparison
  • Feature importance analysis
  • Partial dependence style AQI sensitivity studies

🛠️ Tech Stack

Programming Language

  • Python

Data Analysis

  • Pandas
  • NumPy

Visualization

  • Matplotlib
  • Seaborn
  • Plotly

Machine Learning

  • Scikit-Learn
  • XGBoost

Web Application

  • Streamlit

📂 Project Structure

air-quality-dashboard/
│
├── data/
│   ├── city_day.csv
│   └── city_day_clean.csv
│
├── model/
│   └── xgb_model.pkl
│
├── plots/
│
├── notebooks/
│   ├── 01_eda.ipynb
│   └── 02_eda.ipynb
│
├── app.py
├── utils.py
├── requirements.txt
└── README.md

⚙️ Installation

Clone the repository:

git clone https://github.com/yourusername/air-quality-dashboard.git
cd air-quality-dashboard

Install dependencies:

pip install -r requirements.txt

Run the Streamlit application:

streamlit run app.py

📈 Dashboard Preview

City Insights

  • AQI Prediction
  • AQI Gauge
  • Historical AQI Trends

AQI Drivers

  • Feature Importance Ranking
  • PM2.5 Impact Analysis

Scenario Analysis

  • Pollution Reduction Simulation
  • AQI Forecasting

📚 Dataset

Indian city air quality dataset containing:

  • AQI
  • PM2.5
  • PM10
  • NO₂
  • SO₂
  • CO
  • O₃
  • City information
  • Date information

🌐 Live Demo

Try the deployed application here:

👉 https://airaqi.streamlit.app/

Explore:

  • AQI Prediction Dashboard
  • City-wise AQI Insights
  • AQI Driver Analysis
  • Pollution Scenario Simulator

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages