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.
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.
-
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.
- Feature importance visualization.
- Identification of major pollutants affecting AQI.
- PM2.5 sensitivity analysis.
- Interactive plots for model interpretation.
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
- 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.
- Linear Regression
- Random Forest Regressor
- XGBoost Regressor
✅ XGBoost Regressor
Selected based on superior predictive performance.
The project includes:
- Data cleaning
- Missing value handling
- Pollutant distribution analysis
- City-wise AQI exploration
- Model comparison
- Feature importance analysis
- Partial dependence style AQI sensitivity studies
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Plotly
- Scikit-Learn
- XGBoost
- Streamlit
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
Clone the repository:
git clone https://github.com/yourusername/air-quality-dashboard.git
cd air-quality-dashboardInstall dependencies:
pip install -r requirements.txtRun the Streamlit application:
streamlit run app.py- AQI Prediction
- AQI Gauge
- Historical AQI Trends
- Feature Importance Ranking
- PM2.5 Impact Analysis
- Pollution Reduction Simulation
- AQI Forecasting
Indian city air quality dataset containing:
- AQI
- PM2.5
- PM10
- NO₂
- SO₂
- CO
- O₃
- City information
- Date information
Try the deployed application here:
👉 https://airaqi.streamlit.app/
Explore:
- AQI Prediction Dashboard
- City-wise AQI Insights
- AQI Driver Analysis
- Pollution Scenario Simulator