PM-Predictor / README.md
Zeqhx's picture
Upload README.md with huggingface_hub
23b356f verified
---
title: PM2.5 Air Quality Predictor
emoji: ๐ŸŒ
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
app_port: 7860
---
# Air Quality Prediction with Explainable AI
A PM2.5 air quality prediction system built with XGBoost, featuring explainability through SHAP and counterfactual analysis.
## Overview
This project predicts daily PM2.5 concentrations using historical air quality measurements from the OpenAQ dataset. The model is accompanied by explainability tools to help understand predictions and explore what-if scenarios.
## Features
- XGBoost-based PM2.5 prediction model
- SHAP analysis for feature importance and local explanations
- DiCE counterfactual generation for scenario analysis
- Interactive Streamlit dashboard for predictions and visualizations
- Global air quality station coverage using OpenAQ data
## Quick Start
Simply use the app above to:
1. Search for air quality stations globally or geocode any location
2. Select a date to get PM2.5 predictions
3. View SHAP explanations showing which historical factors influenced the prediction
4. Explore counterfactual scenarios to understand what changes would improve air quality
## Data Source
This project uses the OpenAQ Open Data on AWS archive:
- S3 bucket: `s3://openaq-data-archive/`
- HTTP: `https://openaq-data-archive.s3.amazonaws.com/`
No API key required - data is accessed directly from the public archive.
## Technical Details
- **Model**: XGBoost regression
- **Features**: Historical PM2.5 lag features (1-day, 7-day, rolling averages)
- **XAI Methods**: SHAP for local explanations, DiCE for counterfactuals
- **Data**: OpenAQ global air quality measurements