Skip to content

Repository files navigation

🌍 Urban Air Intelligence

AI-Powered Air Quality Forecasting & Source Attribution Platform

ET AI Hackathon 2.0 Submission

Predict tomorrow's pollution. Explain today's pollution.


Python Scikit-Learn XGBoost NMF NASA FIRMS FastAPI LangGraph OpenStreetMap Open-Meteo Status


An AI system capable of identifying pollution sources, forecasting PM2.5 concentrations, and generating explainable insights using satellite fire data, meteorological observations, and air-quality sensor measurements.

Demo β€’ Architecture β€’ Installation β€’ Usage β€’ Roadmap β€’ Team



🚨 Problem Statement

Urban air pollution is rarely caused by a single source.

A sudden spike in PM2.5 may originate from

  • Vehicular traffic
  • Industrial emissions
  • Biomass burning
  • Construction dust
  • Seasonal agricultural fires

Current AQI dashboards only report how polluted the air is.

They do not explain

  • Why pollution increased
  • Which source contributed the most
  • Whether pollution is likely to worsen in the coming hours

This project addresses these challenges through a unified AI pipeline capable of

  • Forecasting PM2.5 concentrations
  • Identifying dominant pollution sources
  • Incorporating satellite-observed fire activity
  • Providing explainable outputs suitable for downstream LLM agents

✨ Features

🌍 Explainable Pollution Source Attribution

Estimate the contribution of major pollution sources for every prediction using an interpretable machine learning pipeline.

Supported source categories

  • πŸš— Traffic Emissions
  • 🏭 Industrial Emissions
  • πŸ”₯ Biomass Burning
  • πŸ§ͺ Solvent / VOC Emissions

Additional capabilities:

  • Confidence score for every attribution
  • Explainable factor mapping using NMF
  • Fire-aware biomass estimation using NASA VIIRS observations
  • Automatic handling of missing fire data during inference

πŸ“ˆ Hyperlocal PM2.5 Forecasting

Forecast future PM2.5 concentrations using historical air quality, weather observations, and temporal patterns.

Forecast horizons

  • ⏱️ 1 Hour Ahead
  • πŸ“… 24 Hours Ahead
  • πŸ—“οΈ 48 Hours Ahead

Model inputs include:

  • Historical PM2.5 observations
  • Meteorological variables
  • Temporal lag features
  • Rolling statistical features
  • Seasonal & cyclic time encodings
  • Satellite-derived fire indicators

πŸ”₯ Satellite Fire Intelligence

Integrates NASA FIRMS VIIRS satellite observations to quantify the impact of biomass burning on urban air quality.

Extracted fire features include:

  • Fire Count
  • Fire Radiative Power (FRP)
  • Near Fire Zone Statistics
  • Far Fire Zone Statistics
  • Upwind Fire Detection
  • Distance-based Fire Aggregation

πŸš“ Enforcement Intelligence (Work in Progress)

An AI-powered enforcement assistant designed to support environmental agencies by identifying likely emission sources and recommending inspection priorities.

Planned capabilities include:

  • Pollution hotspot identification
  • Industry prioritization
  • Fire-event correlation
  • Explainable inspection recommendations
  • Automated environmental alerts

πŸ—ΊοΈ Multi-City Comparative Dashboard (Work in Progress)

Interactive analytics platform for monitoring and comparing air quality across multiple cities.

Planned visualizations include:

  • AQI Trends
  • Pollution Source Attribution
  • Forecast Comparison
  • Historical Analysis
  • Cross-City Benchmarking
  • Interactive Geospatial Maps

🩺 Citizen Health Advisory (Planned)

An LLM-powered advisory system that converts technical air-quality predictions into easy-to-understand health guidance.

Planned features:

  • Personalized health recommendations
  • Multilingual support
  • AQI-based precautionary measures
  • Source-aware recommendations
  • Vulnerable population alerts
  • Natural language explanations

πŸ€– Multi-Agent AI Workflow

The complete solution is designed as a LangGraph-based Multi-Agent System, where specialized AI agents collaborate to solve different parts of the environmental monitoring workflow.

Current agent architecture:

  • 🌍 Source Attribution Agent
  • πŸ“ˆ Forecasting Agent
  • πŸš“ Enforcement Intelligence Agent (In Progress)
  • 🩺 Health Advisory Agent (Planned)
  • πŸ—ΊοΈ Dashboard & Analytics Agent (In Progress)

Together, these agents form an end-to-end intelligent urban air quality monitoring and decision-support platform.


πŸ’‘ Motivation

Most existing air-quality systems answer only one question

"How polluted is the air?"

This project attempts to answer three.

What caused today's pollution?

What will pollution look like tomorrow?

How confident is the model in its prediction?


πŸ—οΈ Complete System Architecture

                                                NASA FIRMS
                                            Satellite Fire Data
                                                    β”‚
                                                    β”‚
                                                    β–Ό
                                            Fire Feature Builder
                                                    β”‚
                                                    β”‚
                        CAAQMS Sensors ─────► Final Dataset ◄──── AQI Dataset
                                                    β”‚
                                                    β–Ό
                                               Data Cleaning
                                                    β”‚
                                                    β–Ό
                                            MissForest Imputation
                                                    β”‚
                                                    β–Ό
         ─────────────────────────────────────────────────────────────────────────────────────────

                                            Attribution Pipeline
        
                                                Pollutants
                                                    β”‚
                                                    β–Ό
                                            NMF Source Separation
                                                    β”‚
                                          Automatic Factor Mapping
                                                    β”‚
                                         Fire Assisted Biomass Split
                                                    β”‚
                                           Confidence Estimation
                                                    β”‚
                                                    β–Ό
                                                Traffic %
                                               Industrial %
                                                Biomass %
                                                  VOC %
        
        ─────────────────────────────────────────────────────────────────────────────────────────
        
                                           Forecasting Pipeline
        
                                            Historical PM2.5
                                                Weather
                                             Fire Features
                                              Lag Features
                                            Rolling Features
                                           Temporal Features
                                                    β”‚
                                                    β–Ό
                                                 XGBoost
                                                    β”‚
                                                    β–Ό
                                             PM2.5 Forecasts
                                                 1 Hour
                                                 24 Hour
                                                 48 Hour
        
        ─────────────────────────────────────────────────────────────────────────────────────────
        
                                              Pipeline API
                                                    β”‚
                                                    β–Ό
                                           LangGraph Agent (WIP)
                                                    β”‚
                                                    β–Ό
                                        Natural Language Explanations

πŸ“‚ Repository Structure

β”œβ”€β”€ 01_source_attribution/
β”‚   β”œβ”€β”€ attribution_outputs/                 # Saved NMF models, imputers, mappings and attribution artifacts
β”‚   β”œβ”€β”€ 01_source_attribution_nmf.ipynb      # Pollution source attribution using NMF and fire-aware biomass estimation
|
β”œβ”€β”€ 02_aqi_forecasting/
β”‚   β”œβ”€β”€ forecasting_outputs/                 # Saved forecasting models, feature lists and preprocessing artifacts
β”‚   β”œβ”€β”€ 02_forecasting_final.ipynb           # PM2.5 forecasting (1h, 24h, 48h) using XGBoost
β”‚
β”‚   outputs/                                 # Batch inference predictions and evaluation outputs
|
β”œβ”€β”€ preprocessing/
β”‚   β”œβ”€β”€ combine_aqi.py
β”‚   β”œβ”€β”€ combine_caaqms.py
β”‚   β”œβ”€β”€ combine_viirs.py
β”‚   β”œβ”€β”€ final_join.py
β”‚   β”œβ”€β”€ combine_aqi_test.py
β”‚   β”œβ”€β”€ combine_viirs_test.py
β”‚   └── final_test_join.py
β”‚
β”œβ”€β”€ test_data/                               # Sample unseen station data used for end-to-end testing
β”‚
β”œβ”€β”€ data/                                    # Raw and processed datasets used for training
β”‚
β”œβ”€β”€ pipeline.py                              # End-to-end inference pipeline (imputation β†’ attribution β†’ forecasting)
β”œβ”€β”€ run_batch_inference.py                   # Runs the complete pipeline over an entire test dataset
β”‚
β”œβ”€β”€ main.py(WIP)
β”œβ”€β”€ pyproject.toml                           # Project dependencies
└── README.md

βš™οΈ Tech Stack

Category Technologies
Programming Language Python 3.12
Machine Learning Scikit-learn, XGBoost, Non-negative Matrix Factorization (NMF), MissForest
Data Processing Pandas, NumPy, Joblib
Data Visualization Matplotlib, Seaborn
Satellite Data Processing NASA FIRMS VIIRS, Geospatial Distance Calculations (Haversine), Bearing & Upwind Analysis
Air Quality Data CPCB, CAAQMS, Hourly AQI Datasets
AI Frameworks LangChain, LangGraph (Work in Progress)
Model Persistence Joblib

πŸ“Š Models Used

Module Model
Missing Value Imputation MissForest
Source Attribution Non-negative Matrix Factorization
Forecasting XGBoost
Fire Attribution Rule-Based Fire Weighting
Explainability Reconstruction Error

πŸ“ˆ Results

Current pipeline is capable of

βœ… Source Attribution

βœ… PM2.5 Forecasting

βœ… Fire-aware Biomass Estimation

βœ… Confidence Estimation

βœ… Batch Inference


▢️ Installation

Clone the repository

git clone https://github.com/Code-r4Life/Urban-Air-Intelligence.git
cd urban-air-intelligence

Using uv

If you already have uv installed,

uv sync

If not, install it first.

Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

macOS / Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

πŸš€ Hackathon Progress

Problem Statement Requirement Our Solution Current Status
1. Geospatial Pollution Source Attribution Engine Built an explainable pollution source attribution pipeline using Non-negative Matrix Factorization (NMF), meteorological observations, and NASA VIIRS fire data. The system estimates contributions from traffic, industrial emissions, biomass burning, and VOC sources while generating confidence scores and interpretable factor mappings. βœ… Completed
2. Hyperlocal Predictive AQI Forecasting Agent Developed a multi-horizon PM2.5 forecasting pipeline that predicts air quality 1 hour, 24 hours, and 48 hours ahead using XGBoost, temporal lag features, rolling statistics, meteorological variables, and satellite-derived fire information. βœ… Completed
3. Enforcement Intelligence & Prioritisation Agent Developing an AI-powered enforcement assistant that correlates pollution forecasts, source attribution, fire activity, and emission hotspots to recommend inspection priorities for environmental agencies. βœ… Completed
4. Multi-City Comparative Intelligence Dashboard Building an interactive dashboard for comparing pollution trends, source attribution, forecasts, and environmental indicators across multiple cities in India. βœ… Completed
5. Citizen Health Risk Advisory System Developing an LLM-powered multilingual advisory system that generates personalized health recommendations based on forecast AQI, dominant pollution sources, and vulnerable population groups. βœ… Completed
LangGraph Multi-Agent Workflow Integrating all AI modules into a unified multi-agent architecture using LangGraph, enabling autonomous reasoning, forecasting, source attribution, enforcement recommendations, and citizen advisory generation. βœ… Completed
Real-Time Sensor Integration Planned deployment pipeline for ingesting live CAAQMS observations and NASA VIIRS satellite data for continuous end-to-end inference. 🚧 Planned

πŸ‘₯ Team

  • Shinjan Saha
  • Arya Gupta
  • Srijan Sarkar
  • Pritam Paul

πŸ™ Acknowledgements

  • Central Pollution Control Board (CPCB)
  • Continuous Ambient Air Quality Monitoring Stations (CAAQMS)
  • NASA FIRMS (Fire Information for Resource Management System)
  • ET AI Hackathon 2.0

πŸ“œ License

This repository has been developed as part of ET AI Hackathon 2.0.


⭐ If you found this project interesting, consider giving it a star!

Made with ❀️ by Team Outlaws

About

Predict tomorrow's pollution. Explain today's pollution.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages