Skip to content

Latest commit

Β 

History

History
43 lines (30 loc) Β· 1.3 KB

File metadata and controls

43 lines (30 loc) Β· 1.3 KB

citywise-pm25-forecast

An AI-powered Streamlit web application to forecast PM2.5 air pollution levels for any Indian city using historical environmental data.

πŸš€ Features

  • πŸ“Š City-wise PM2.5 concentration prediction for next 3 months
  • 🧠 Trained on XGBoost Regression Model
  • πŸ™οΈ Built using Indian air quality & meteorological datasets
  • πŸ“‰ Auto-reshaping of historical wide-format data to time-series format
  • πŸ“¦ Real-time visualization & download of forecast data
  • πŸ’‘ Streamlit UI for easy use and deployment

πŸ“Œ How It Works

  1. Historical air quality data is loaded, cleaned, and reshaped (wide β†’ long format)
  2. Features like year, month, SO2, NO2, PM10, and previous PM2.5 values are used
  3. XGBoost Regression is trained to forecast PM2.5 for the next 3 months
  4. User selects city in Streamlit UI and gets predictions & plots

πŸ§ͺ Model Details

  • Model: XGBoostRegressor
  • Target: PM2.5 lagged value
  • Features: SO2, NO2, PM10, month, year, lagged PM2.5
  • Evaluation: MAE, RMSE on validation set

πŸ“¦ Installation

# Clone the repo
git clone https://github.com/Shraddha-DSA/citywise-pm25-forecast.git
cd citywise-pm25-forecast

# Install dependencies
pip install -r requirements.txt

# Run the app
streamlit run streamlit_app.py