Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Surface AQI & HCHO Hotspot Analysis over India

ISRO Hackathon - Problem Statement 3

Python TensorFlow Streamlit GEE License

Predict surface-level Air Quality Index from satellite data using deep learning, and detect formaldehyde (HCHO) hotspots during biomass burning seasons over India.


What This Project Does

Objective Input Method Output
Surface AQI Prediction TROPOMI + MODIS AOD + ERA5 + CPCB CNN-LSTM Deep Learning Spatial AQI maps over India
HCHO Hotspot Detection TROPOMI HCHO + MODIS Fire + ERA5 Wind Statistical Threshold + DBSCAN Hotspot maps + Source regions

Key Results

Model Performance (CNN-LSTM)

Pollutant Pearson R R² Score RMSE
PM2.5 0.949 0.895 20.0
PM10 0.963 0.924 27.0
NO2 0.888 0.785 9.5
SO2 0.840 0.696 4.2
CO 0.892 0.772 0.4
O3 0.603 0.330 10.5

HCHO Analysis

  • Fire-HCHO Correlation: R = 0.81 (1-day transport lag)
  • Hotspot Regions: Indo-Gangetic Plain, Eastern UP, NE India, Central India
  • Study Period: January 2023 - June 2025 (covers 2 burning seasons)

Dashboard Preview

The interactive Streamlit dashboard has 4 tabs:

Tab What It Shows
How It Works Project methodology, data pipeline flowcharts, data source table
Objective 1: Surface AQI Live city AQI checker, station map, gridded AQI, year-over-year comparison
Objective 2: HCHO Hotspots HCHO heatmap with fire overlay, temporal evolution, lag correlation
Analysis & Validation Model accuracy, predicted vs actual plots, feature importance

Project Architecture

Satellite Data                      Ground Data               Meteorological Data
(TROPOMI S5P)                       (CPCB Stations)           (ERA5/IMDAA)
NO2, SO2, CO, O3, HCHO             PM2.5, PM10, NO2,         Temperature, Wind,
+ MODIS/INSAT-3D AOD               SO2, CO, O3               Pressure, Rainfall
        |                                |                          |
        +----------------+---------------+--------------------------+
                         |
                   ┌─────▼──────┐
                   │  CNN-LSTM  │  30-day sliding window
                   │   Model    │  11 features → 6 outputs
                   └─────┬──────┘
                         |
              ┌──────────┼──────────┐
              ▼          ▼          ▼
        Surface AQI   Gridded    Validation
        per station   AQI Map    Metrics

HCHO Pipeline

TROPOMI HCHO ──→ Mean + 2σ Threshold ──→ DBSCAN Clustering ──→ Source Regions
MODIS Fire   ──→ Fire Count Extraction ──→ Pearson Correlation ──→ Lag Analysis
ERA5 Wind    ──→ Transport Vectors ──→ Wind Field Maps

Data Sources

Source Variables Access
TROPOMI Sentinel-5P NO2, SO2, CO, O3, HCHO column densities Google Earth Engine
INSAT-3D Aerosol Optical Depth (AOD) MOSDAC
MODIS (MOD08_D3) AOD (proxy for INSAT-3D when unavailable) Google Earth Engine
ERA5 / IMDAA Temperature, Wind (u,v), Pressure, Precipitation CDS / NCMRWF
MODIS/VIIRS FIRMS Active fire locations & brightness temperature NASA FIRMS
CPCB PM2.5, PM10, NO2, SO2, CO, O3 (ground-level) CPCB Data

Quick Start

1. Clone & Setup

git clone https://github.com/Adityakumarrama/ISRO.git
cd ISRO/ISRO_Hackathon

# Create virtual environment (Python 3.12 required for TensorFlow)
py -3.12 -m venv venv
venv\Scripts\activate        # Windows
# source venv/bin/activate   # Linux/Mac

pip install -r requirements.txt

2. Run the Pipeline

# Step 1: Download satellite data (requires GEE authentication)
# python 1_download_satellite.py    # Optional - needs earthengine authenticate
# python 2_download_fire.py         # Optional - needs earthengine authenticate

# Step 2: Preprocess & build features (auto-generates synthetic data if GEE unavailable)
python 3_preprocess.py
python 4_feature_matrix.py

# Step 3: Train CNN-LSTM model
python 5_train_model.py

# Step 4: Generate predictions
python 6_predict_aqi.py

# Step 5: HCHO hotspot analysis
python 7_hcho_hotspots.py

# Step 6: Generate static maps & plots
python 8_visualize.py

3. Launch Dashboard

streamlit run dashboard.py

Open http://localhost:8501 in your browser.


Project Structure

ISRO_Hackathon/
├── config.py                  # All constants, paths, model hyperparameters
├── 1_download_satellite.py    # GEE download: TROPOMI + MODIS AOD + ERA5
├── 2_download_fire.py         # MODIS/VIIRS fire count download
├── 3_preprocess.py            # Clean, merge, collocate all datasets
├── 4_feature_matrix.py        # Build 30-day sliding window sequences
├── 5_train_model.py           # Train CNN-LSTM (Conv1D→LSTM→Dense)
├── 6_predict_aqi.py           # Generate AQI predictions + gridded map
├── 7_hcho_hotspots.py         # HCHO hotspot detection + fire correlation
├── 8_visualize.py             # Cartopy maps + Matplotlib plots
├── dashboard.py               # Streamlit interactive dashboard
├── requirements.txt           # Python dependencies
├── utils/
│   ├── aqi_calculator.py      # CPCB AQI sub-index formula
│   ├── gee_helpers.py         # Google Earth Engine utilities
│   └── plot_helpers.py        # Cartopy India map helpers
├── data/
│   ├── raw/                   # Downloaded satellite data
│   ├── processed/             # Merged & cleaned datasets
│   └── cpcb/                  # Ground station CSVs
├── models/saved/              # Trained model weights & scalers
└── outputs/
    ├── maps/                  # Spatial maps (AQI, HCHO, clusters)
    └── plots/                 # Time series, scatter, correlation plots

CNN-LSTM Model Architecture

Input (30 days × 11 features)
    │
    ├── Conv1D(64, kernel=3, ReLU)     ← Extract spatial patterns
    ├── Conv1D(128, kernel=3, ReLU)    ← Deeper feature extraction
    ├── MaxPooling1D(2)                ← Downsample
    │
    ├── LSTM(128, return_sequences)    ← Learn temporal dependencies
    ├── LSTM(64)                       ← Compress temporal features
    │
    ├── Dropout(0.3)                   ← Prevent overfitting
    ├── Dense(32, ReLU)                ← Final feature combination
    └── Dense(6, Linear)               ← Output: PM2.5, PM10, NO2, SO2, CO, O3

Training Configuration:

  • Loss: MSE | Optimizer: Adam (lr=0.001)
  • Split: 70% train / 15% validation / 15% test (time-based, not random)
  • Early stopping: patience=10 | LR reduction on plateau

AQI Calculation (CPCB Standard)

AQI Range Category Color Health Impact
0-50 Good 🟢 Green Minimal impact
51-100 Satisfactory 🟡 Light Green Minor discomfort to sensitive people
101-200 Moderate 🟠 Yellow Breathing discomfort for lung/heart patients
201-300 Poor 🔴 Orange Breathing discomfort on prolonged exposure
301-400 Very Poor 🟣 Red Respiratory illness on prolonged exposure
401-500 Severe ⚫ Maroon Health emergency

Formula: AQI = max(Sub-Index₁, Sub-Index₂, ..., Sub-Indexₙ)


HCHO Hotspot Detection Method

  1. Threshold: Pixels where HCHO > mean + 2σ flagged as hotspots
  2. Clustering: DBSCAN (eps=0.5°, min_samples=5) groups hotspots into source regions
  3. Correlation: Pearson R between daily fire count and mean HCHO (+ lag analysis up to 7 days)
  4. Transport: ERA5 wind vectors show smoke transport direction from burning regions

Tech Stack

Category Tools
Language Python 3.12
Deep Learning TensorFlow 2.21, Keras
Satellite Data Google Earth Engine API
Data Processing Pandas, NumPy, Xarray, Scikit-learn
Clustering DBSCAN (Scikit-learn)
Visualization Plotly, Matplotlib, Cartopy
Dashboard Streamlit
Explainability SHAP / Permutation Importance

Relevance to National Priorities

Initiative Connection
NCAP Track 20-40% pollution reduction target using satellite-derived AQI
SDG 11.6 Reduce adverse urban environmental impact through air quality monitoring
Chintan Shivir 2.0 Urban climate, air quality, and sustainable development targets
INSAT-3D Demonstrates use of Indian satellite AOD data for pollution monitoring

Team

Built for ISRO Hackathon 2024 | Problem Statement 3


Satellite data making air quality information accessible to every Indian citizen.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages