How tharun-debug2006/aqi works
SmartAQI is a Bengaluru-focused air-quality forecasting and personalized health-advisory application. Its documented offline workflow audits and preprocesses station history, engineers forecasting features, trains and evaluates pollutant models, then presents forecasts and alerts in a Streamlit dashboard. AQI calculation, coverage/locality analysis, historical trends, and Open-Meteo estimates are additional product capabilities. The dashboard, forecasting, and alert implementations were not sampled, so their connections are documented or marked unverified rather than inferred from imports.
Main entry points: app.py Streamlit dashboard · train_main.py Model training · clean.py Clean and merge · all_stations_hourly.parquet Hourly dataset
Components 19
Data preparation
- Station history
Data/raw - Coverage audit
src/smartaqi/data_ingestion/audit_data.py - Historical loaders
src/smartaqi/data_ingestion/loaders.py - Clean and merge
src/smartaqi/preprocessing/clean.py - Hourly dataset
Data/processed/all_stations_hourly.parquet - Locality coverage
src/smartaqi/preprocessing/clean.py - Audit and metrics
reports
AQI and prediction
- Forecast features
src/smartaqi/features/build.py - Model training
src/smartaqi/models/train_main.py - Model evaluation
src/smartaqi/models/train.py - Trained models
models - Forecast generation
src/smartaqi/forecasting - CPCB AQI
src/smartaqi/aqi/compute.py
Health advisories
- Health advisories
src/smartaqi/alerts/engine.py
Dashboard and integrations
- Streamlit dashboard
dashboard/app.py - Open-Meteo data
src/smartaqi/data_ingestion - Product configuration
config.yaml
Other components
- Bengaluru user
- Open-Meteo
Connections 22
- Bengaluru user → Streamlit dashboard: views
README.md - Station history → Coverage audit: audits
README.md - Station history → Historical loaders: loads
README.md - Historical loaders → Clean and merge: loads via
src/smartaqi/preprocessing/clean.py - Clean and merge → Hourly dataset: writes
README.md - Clean and merge → Locality coverage: assesses
src/smartaqi/preprocessing/clean.py - Coverage audit → Audit and metrics: produces
README.md - Hourly dataset → Forecast features: builds from
README.md - Forecast features → Model training: provides features
src/smartaqi/models/train_main.py - Model training → Model evaluation: trains and evaluates
src/smartaqi/models/train_main.py - Model training → Trained models: persists
README.md - Model training → Audit and metrics: writes comparison
README.md - Trained models → Forecast generation: predicts with
- Forecast generation → Streamlit dashboard: displays
- Hourly dataset → CPCB AQI: computes from
- CPCB AQI → Streamlit dashboard: displays
- Forecast generation → Health advisories: informs
- Health advisories → Streamlit dashboard: displays
- Open-Meteo → Open-Meteo data: serves estimates
README.md - Open-Meteo data → Streamlit dashboard: shows estimates
README.md - Product configuration → Locality coverage: sets thresholds
README.md - Product configuration → Health advisories: sets thresholds
README.md