An advanced, research-grade Machine Learning pipeline and interactive dashboard for modeling, forecasting, and understanding global PM2.5 air pollution trends.
This project fuses ground-truth pollution data with CIESIN Satellite MODIS/MISR proxy features to train robust predictive models, offering Explainable AI (SHAP) diagnostics and interactive NASA-style global visualizations.
-
Research-Grade Machine Learning Pipeline (
src/backend_model.py)- Integrates ground-level PM2.5 measurements with high-resolution satellite GeoTIFF data.
- Utilizes
TimeSeriesSplitcross-validation to prevent temporal data leakage. - Implements advanced
XGBoostmodeling with early stopping and feature dropout constraints to prevent overfitting. - Automatically generates global predictive features (Rolling Means, Lags, Demographic Growth rates).
-
Explainable AI (XAI) Diagnostics
- Full integration with SHAP (SHapley Additive exPlanations) to transparently show how factors like population, historical pollution, and satellite AOD proxies influence the model's predictions.
-
Global AI Pollution Forecasting Maps (
src/generate_forecast_maps.py)- Automatically renders the model's predictions into High-Resolution Static Maps using
geopandasandmatplotlib. - Generates interactive, NASA-style HTML dashboards using
plotlyfor web-based dataset exploration.
- Automatically renders the model's predictions into High-Resolution Static Maps using
-
Interactive Streamlit Intelligence Dashboard (
dashboard/app.py)- A fully responsive, light-mode web interface to interact with the pollution dataset.
- Includes real-time prediction simulators where you can tweak inputs (like satellite readings or population) to see how the XGBoost model reacts in real-time.
- Built-in dynamic SHAP visualizers to explain the real-time simulation logic.
AeroGraphFed/
│
├── data/
│ ├── raw/ # Ground truth global PM2.5 tracking data
│ └── derived/ # Extracted country-level satellite PM2.5 proxies
│
├── images/ # Output directory for generated static maps, SHAP plots, and HTML Dashboards
│
├── dashboard/
│ └── app.py # The interactive Streamlit Web Dashboard
│
├── models/ # Pickled legacy/baseline models and the compiled pm25_xgboost_research_model.pkl
│
├── src/
│ ├── extract_satellite_features.py # Pipeline to extract CIESIN GeoTIFFs to tabular data using Geopandas
│ ├── backend_model.py # The core XGBoost Training Pipeline & Validation
│ ├── generate_forecast_maps.py # Map generation script for static and dynamic plots
│ ├── eda_satellite.py # Exploratory data analysis for satellite features
│ └── feature_engineering.py # Feature processing and transformation utilities
│
└── README.md # Project documentation
You need Python 3.9+ installed. Install the required spatial and machine learning dependencies:
pip install pandas numpy xgboost scikit-learn shap plotly geopandas rasterstats streamlit matplotlib joblib kaleidoAlternatively, install from the provided requirements file:
pip install -r requirements.txtIf you have raw CIESIN GeoTIFF files, extract them to country-level tabular bounds:
python src/extract_satellite_features.py(Note: requires the CIESIN dataset downloaded locally).
Run the core training pipeline. This will perform Time-Series Cross Validation, train the final robust model, and output SHAP summary plots in the src/ directory.
python src/backend_model.pyCreate the high-resolution publication maps and interactive HTML plots based on the latest model forecasts:
python src/generate_forecast_maps.pyStart the intelligent web interface to analyze trends, run live simulations, and interpret the model using SHAP:
streamlit run dashboard/app.py- Ground PM2.5 & Population: Curated historical global population-weighted datasets.
- Satellite PM2.5 Proxy: CIESIN SEDAC Global Annual PM2.5 Grids from MODIS, MISR and SeaWiFS Aerosol Optical Depth (AOD).
- Cartography:
NaturalEarthdatasets used for spatial rendering and zonal boundary extraction.
This project is designed for research and educational purposes. Contributions are welcome for:
- Model Improvements: Enhanced algorithms, additional features
- Data Sources: Integration of new satellite or ground-based datasets
- Visualization: Advanced mapping techniques and interactive features
- Documentation: Improving code comments and examples
The XGBoost model achieves strong predictive performance with:
- Temporal Cross-Validation: Prevents data leakage across time periods
- Feature Importance: SHAP-based explainability for transparent predictions
- Regularization: Early stopping and dropout constraints to prevent overfitting
- Algorithm: XGBoost Regressor with optimized hyperparameters
- Validation: TimeSeriesSplit cross-validation (temporal awareness)
- Features: Satellite AOD proxies, population metrics, temporal lags, rolling statistics
- Satellite Feature Extraction: GeoTIFF to tabular conversion using geopandas
- Feature Engineering: Temporal lags, rolling means, demographic growth rates
- Quality Control: Automated data validation and missing value handling
This project is provided for research and educational purposes. Please ensure compliance with data source licenses when using satellite datasets.