How jeevesh2605/smoke-dispersion works
SmokeGuard estimates location-level PM2.5 risk for Delhi-NCR, combining station history, wind and fire-dispersion features. The main workflow is station selection in the dashboard, API orchestration of current inputs and remote inference, then a risk forecast and rule-based advice. Offline collection, feature engineering and model training are documented product stages; their relationships are shown only where README or sampled source supports them. The map visualizes recent observations separately from forecast results. Unsampled implementation links are omitted.
Main entry points: forecast.py Forecast assembly · app.py FastAPI routes · App.jsx App navigation · Dashboard.jsx Station dashboard
Components 20
Offline data and training
- Fire, AQI, wind data
data/raw - Data collection
scripts/fetch_aqi_by_stations.py - Feature engineering
scripts/build_historical_dispersion_features.py - Unified dataset
scripts/build_unified_dataset.py - Random Forest training
scripts/train_unified_model.py - Local model bundle
data/processed
Forecast service
- FastAPI routes
app.py - Risk advice
app.py
Forecast inputs and inference
- Location metadata
agent/tools/location.py - Recent PM2.5 history
data/raw/aqi_recent.csv - Current wind lookup
agent/tools/forecast.py - Stored fire features
data/processed/today_fire_features.csv - Forecast assembly
agent/tools/forecast.py - Remote prediction client
agent/tools/predict_pm25.py
Web experience
- App navigation
frontend/src/App.jsx - Station dashboard
frontend/src/Dashboard.jsx - 3D NCR map
frontend/src/components/NCRMap.jsx - Map geography and AQI
frontend/public/data
Other components
- SageMaker inference
- Dashboard user
Connections 21
- Fire, AQI, wind data → Data collection: collects
README.md - Fire, AQI, wind data → Feature engineering: engineers
README.md - Feature engineering → Unified dataset: builds
README.md - Unified dataset → Random Forest training: trains
README.md - Random Forest training → Local model bundle: produces
README.md - Dashboard user → App navigation: opens
frontend/src/App.jsx - App navigation → 3D NCR map: renders
frontend/src/App.jsx - App navigation → Station dashboard: opens
frontend/src/App.jsx - Station dashboard → FastAPI routes: requests advice
frontend/src/Dashboard.jsx - Station dashboard → Recent PM2.5 history: loads stations
frontend/src/Dashboard.jsx - 3D NCR map → Map geography and AQI: loads
frontend/src/components/NCRMap.jsx - FastAPI routes → Local model bundle: loads model
app.py - FastAPI routes → Forecast assembly: calls forecast
app.py - FastAPI routes → Risk advice: builds advice
app.py - Forecast assembly → Location metadata: looks up
agent/tools/forecast.py - Forecast assembly → Current wind lookup: fetches wind
agent/tools/forecast.py - Forecast assembly → Recent PM2.5 history: reads history
agent/tools/forecast.py - Forecast assembly → Stored fire features: reads features
agent/tools/forecast.py - Forecast assembly → Remote prediction client: submits inputs
agent/tools/forecast.py - Remote prediction client → SageMaker inference: invokes endpoint
agent/tools/predict_pm25.py - Risk advice → Forecast assembly: uses result
app.py