An end-to-end data science project that analyzes historical air quality trends in Kathmandu, predicts AQI using machine learning, and provides real-time forecasting using Facebook Prophet — all wrapped in an interactive Streamlit dashboard.
🔗 Live App: kathmanduairqualityforecasting.streamlit.app
- Table of Contents
- Project Overview
- Objectives
- Features
- Methodology
- Models Used
- Dashboard Preview
- Technologies Used
- Folder Structure
- Run Locally
- Results
- References
Air pollution in Kathmandu has become a growing public health concern. This project provides a comprehensive analysis and predictive framework for monitoring and forecasting the Air Quality Index (AQI) using real-world environmental and meteorological data.
Using statistical modeling and machine learning, we built:
- A predictive AQI model based on environmental inputs.
- A time-series forecasting model for future AQI estimation.
- An interactive Streamlit dashboard for visualization, prediction, and forecasting.
- Analyze historical AQI and weather data of Kathmandu.
- Forecast short-term AQI trends (24, 48, 72 hours).
- Develop a Random Forest-based model for real-time AQI prediction.
- Deploy an interactive web dashboard for public and policymaker use.
- Visualize: Interactive charts (line, bar, heatmap, pie) showing AQI trends, statistics, and category breakdowns.
- Predict: Input current environmental parameters to get predicted AQI and health advisories.
- Forecast: Generate 24/48/72-hour AQI forecasts using Facebook Prophet.
- Live Dashboard: Deployed and accessible online.
- Data Collection: Open-Meteo API + government air quality datasets.
- Preprocessing: Handled missing values, normalized features, converted time series.
- Exploratory Analysis: Visualized trends, correlations, and seasonal effects.
- Modeling:
- Random Forest Regressor for real-time AQI prediction.
- Facebook Prophet for time-series forecasting.
- Deployment: Streamlit Cloud
Model | Purpose | Metric (R² Score) |
---|---|---|
Random Forest Regressor | Predict AQI from environment inputs | 0.91 |
Facebook Prophet | Forecast AQI (24–72 hrs) | N/A (Time series) |
- Python
- Streamlit (Dashboard)
- Facebook Prophet (Time-series forecasting)
- Scikit-learn (Machine Learning)
- Pandas, NumPy, Matplotlib, Seaborn, Plotly (EDA & Visualization)
├── Dashboard/
│ ├── app.py # Main Streamlit app
│ ├── models/
│ │ └── model.pkl # Trained Random Forest model
│ ├── data/
│ │ └── air_quality_data.csv # Historical dataset
│ └── models/
│ └── prophet_model.py # Forecasting functions
git clone https://github.com/poudelsangam77/Comprehensive-Analysis-and-Forecasting-of-Air-Quality-in-Kathmandu.git
cd kathmandu-air-quality-forecasting/Dashboard
python -m venv venv
source venv/bin/activate # on Windows: venv\Scripts\activate
pip install -r requirements.txt
streamlit run app.py
- AQI prediction achieved R² = 0.91 with Random Forest Regressor.
- Seasonal trends and daily pollution cycles clearly visualized.
- Streamlit dashboard enabled public-friendly access to air quality insights and forecasts.
Developed by
Sangam Paudel · Saroj Rawal · Subesh Yadav
Department of Electronics and Computer Engineering, Pulchowk Campus
Tribhuvan University, Nepal