# muskaanthakur24/heatwave-prediction-dashboard architecture

> Architecture diagram of the GitHub repository muskaanthakur24/heatwave-prediction-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muskaanthakur24/heatwave-prediction-dashboard
- Repository: https://github.com/muskaanthakur24/heatwave-prediction-dashboard

## Overview

HeatWatch is a district-level heatwave intelligence platform. Its principal workflow turns weather data into engineered features and risk predictions, then presents forecasts, anomaly signals, explanations, location views, alerts, and climate analyses in a Streamlit dashboard. The README documents the major phase relationships and capabilities; sampled excerpts confirm selected implementations, while unsampled subsystem connections are included only where the README explicitly describes them.

Main entry points: [`dashboard/app.py`](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/app.py) (Streamlit dashboard), [`dashboard/step6_part2_features.py`](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part2_features.py) (Feature engineering), [`dashboard/step10_part1_location_data.py`](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step10_part1_location_data.py) (Location intelligence), [`dashboard/step6_part4_predict.py`](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part4_predict.py) (Risk prediction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Risk Pipeline"]
  node_features["Feature engineering"]
  node_training["Model training"]
  node_prediction["Risk prediction"]
end

subgraph group_signals["Forecasts And Signals"]
  node_forecast_models["Forecast models"]
  node_sarima["SARIMA forecast"]
  node_lstm["LSTM forecast"]
  node_forecast_ensemble["Forecast ensemble"]
  node_anomaly_models["Anomaly models"]
  node_autoencoder["LSTM autoencoder"]
  node_anomaly_scoring["Anomaly scoring"]
  node_live_detection["Live detection"]
end

subgraph group_insight["Location And Climate"]
  node_shap["SHAP explanations"]
  node_local_explain["Local explanations"]
  node_location_data["Location intelligence"]
  node_map["Interactive map"]
  node_trends["Trend analysis"]
  node_uhi["Urban heat analysis"]
  node_projections["CMIP6 projections"]
end

subgraph group_product["Dashboard And Alerts"]
  node_app["Streamlit dashboard<br/>[app.py]"]
  node_climate_ui["Climate dashboard"]
  node_alerts["Alert engine"]
end

subgraph group_foundation["Shared Runtime"]
  node_cache["Cache utilities"]
  node_checkpoints["Job checkpoints"]
  node_registry["Location registry"]
end

node_users(("HeatWatch users"))
node_weather{{"Open-Meteo"}}
node_gmail{{"Gmail SMTP"}}
node_telegram{{"Telegram API"}}

node_weather -->|"supplies weather"| node_features
node_features -->|"provides features"| node_training
node_training -->|"trains model"| node_prediction
node_features -->|"provides history"| node_forecast_models
node_features -->|"provides history"| node_sarima
node_features -->|"provides history"| node_lstm
node_forecast_models -->|"supplies forecasts"| node_forecast_ensemble
node_sarima -->|"supplies forecasts"| node_forecast_ensemble
node_lstm -->|"supplies forecasts"| node_forecast_ensemble
node_features -->|"provides data"| node_anomaly_models
node_features -->|"provides data"| node_autoencoder
node_anomaly_models -->|"supplies scores"| node_anomaly_scoring
node_autoencoder -->|"supplies scores"| node_anomaly_scoring
node_weather -->|"serves live weather"| node_live_detection
node_prediction -->|"explains model"| node_shap
node_prediction -->|"explains risk"| node_local_explain
node_features -->|"provides locations"| node_location_data
node_location_data -->|"provides map data"| node_map
node_registry -->|"provides locations"| node_location_data
node_location_data -->|"provides locations"| node_trends
node_location_data -->|"provides locations"| node_uhi
node_location_data -->|"provides locations"| node_projections
node_trends -->|"renders analysis"| node_climate_ui
node_uhi -->|"renders analysis"| node_climate_ui
node_projections -->|"renders projections"| node_climate_ui
node_users -->|"uses dashboard"| node_app
node_app -->|"runs risk view"| node_prediction
node_app -->|"shows forecasts"| node_forecast_ensemble
node_app -->|"shows anomalies"| node_live_detection
node_app -->|"shows explanations"| node_shap
node_app -->|"shows explanations"| node_local_explain
node_app -->|"shows locations"| node_map
node_app -->|"renders climate"| node_climate_ui
node_app -->|"integrates alerts"| node_alerts
node_alerts -->|"sends email"| node_gmail
node_alerts -->|"sends messages"| node_telegram
node_uhi -->|"reads and writes cache"| node_cache
node_location_data -->|"records progress"| node_checkpoints

click node_features "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part2_features.py"
click node_training "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part3_train_model.py"
click node_prediction "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part4_predict.py"
click node_forecast_models "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part1_prophet.py"
click node_sarima "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part2_sarima.py"
click node_lstm "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part3_lstm.py"
click node_forecast_ensemble "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part4_ensemble.py"
click node_anomaly_models "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part1_isolation_forest.py"
click node_autoencoder "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part2_lstm_autoencoder.py"
click node_anomaly_scoring "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part3_ensemble_scoring.py"
click node_live_detection "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part4_live_detection.py"
click node_shap "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step11_part1_shap_global.py"
click node_local_explain "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step11_part2_local_explain.py"
click node_location_data "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step10_part1_location_data.py"
click node_map "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step10_part2_folium_map.py"
click node_trends "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_part1_mann_kendall.py"
click node_uhi "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_part2_urban_heat_island.py"
click node_projections "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_part3_cmip6_projections.py"
click node_app "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/app.py"
click node_climate_ui "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_climate_intelligence_dashboard.py"
click node_alerts "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step9_part1_alert_engine.py"
click node_cache "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_cache_utils.py"
click node_checkpoints "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_checkpoint_utils.py"
click node_registry "https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_location_registry.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_features,node_training,node_prediction,node_users toneBlue
class node_forecast_models,node_sarima,node_lstm,node_forecast_ensemble,node_anomaly_models,node_autoencoder,node_anomaly_scoring,node_live_detection toneAmber
class node_shap,node_local_explain,node_location_data,node_map,node_trends,node_uhi,node_projections,node_telegram toneMint
class node_app,node_climate_ui,node_alerts toneRose
class node_cache,node_checkpoints,node_registry,node_weather,node_gmail toneIndigo
```

## Components

### Risk Pipeline

- [Feature engineering](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part2_features.py): `dashboard/step6_part2_features.py`
- [Model training](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part3_train_model.py): `dashboard/step6_part3_train_model.py`
- [Risk prediction](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step6_part4_predict.py): `dashboard/step6_part4_predict.py`

### Forecasts And Signals

- [Forecast models](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part1_prophet.py): `dashboard/step7_part1_prophet.py`
- [SARIMA forecast](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part2_sarima.py): `dashboard/step7_part2_sarima.py`
- [LSTM forecast](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part3_lstm.py): `dashboard/step7_part3_lstm.py`
- [Forecast ensemble](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step7_part4_ensemble.py): `dashboard/step7_part4_ensemble.py`
- [Anomaly models](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part1_isolation_forest.py): `dashboard/step8_part1_isolation_forest.py`
- [LSTM autoencoder](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part2_lstm_autoencoder.py): `dashboard/step8_part2_lstm_autoencoder.py`
- [Anomaly scoring](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part3_ensemble_scoring.py): `dashboard/step8_part3_ensemble_scoring.py`
- [Live detection](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step8_part4_live_detection.py): `dashboard/step8_part4_live_detection.py`

### Location And Climate

- [SHAP explanations](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step11_part1_shap_global.py): `dashboard/step11_part1_shap_global.py`
- [Local explanations](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step11_part2_local_explain.py): `dashboard/step11_part2_local_explain.py`
- [Location intelligence](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step10_part1_location_data.py): `dashboard/step10_part1_location_data.py`
- [Interactive map](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step10_part2_folium_map.py): `dashboard/step10_part2_folium_map.py`
- [Trend analysis](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_part1_mann_kendall.py): `dashboard/step12_part1_mann_kendall.py`
- [Urban heat analysis](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_part2_urban_heat_island.py): `dashboard/step12_part2_urban_heat_island.py`
- [CMIP6 projections](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_part3_cmip6_projections.py): `dashboard/step12_part3_cmip6_projections.py`

### Dashboard And Alerts

- [Streamlit dashboard](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/app.py): `dashboard/app.py`
- [Climate dashboard](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_climate_intelligence_dashboard.py): `dashboard/step12_climate_intelligence_dashboard.py`
- [Alert engine](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step9_part1_alert_engine.py): `dashboard/step9_part1_alert_engine.py`

### Shared Runtime

- [Cache utilities](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_cache_utils.py): `dashboard/step12_cache_utils.py`
- [Job checkpoints](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_checkpoint_utils.py): `dashboard/step12_checkpoint_utils.py`
- [Location registry](https://github.com/muskaanthakur24/heatwave-prediction-dashboard/blob/main/dashboard/step12_location_registry.py): `dashboard/step12_location_registry.py`

### Other components

- **HeatWatch users**
- **Open-Meteo**
- **Gmail SMTP**
- **Telegram API**

## Connections

- Open-Meteo → Feature engineering: supplies weather
- Feature engineering → Model training: provides features
- Model training → Risk prediction: trains model
- Feature engineering → Forecast models: provides history
- Feature engineering → SARIMA forecast: provides history
- Feature engineering → LSTM forecast: provides history
- Forecast models → Forecast ensemble: supplies forecasts
- SARIMA forecast → Forecast ensemble: supplies forecasts
- LSTM forecast → Forecast ensemble: supplies forecasts
- Feature engineering → Anomaly models: provides data
- Feature engineering → LSTM autoencoder: provides data
- Anomaly models → Anomaly scoring: supplies scores
- LSTM autoencoder → Anomaly scoring: supplies scores
- Open-Meteo → Live detection: serves live weather
- Risk prediction → SHAP explanations: explains model
- Risk prediction → Local explanations: explains risk
- Feature engineering → Location intelligence: provides locations
- Location intelligence → Interactive map: provides map data
- Location registry → Location intelligence: provides locations
- Location intelligence → Trend analysis: provides locations
- Location intelligence → Urban heat analysis: provides locations
- Location intelligence → CMIP6 projections: provides locations
- Trend analysis → Climate dashboard: renders analysis
- Urban heat analysis → Climate dashboard: renders analysis
- CMIP6 projections → Climate dashboard: renders projections
- HeatWatch users → Streamlit dashboard: uses dashboard
- Streamlit dashboard → Risk prediction: runs risk view
- Streamlit dashboard → Forecast ensemble: shows forecasts
- Streamlit dashboard → Live detection: shows anomalies
- Streamlit dashboard → SHAP explanations: shows explanations
- Streamlit dashboard → Local explanations: shows explanations
- Streamlit dashboard → Interactive map: shows locations
- Streamlit dashboard → Climate dashboard: renders climate
- Streamlit dashboard → Alert engine: integrates alerts
- Alert engine → Gmail SMTP: sends email
- Alert engine → Telegram API: sends messages
- Urban heat analysis → Cache utilities: reads and writes cache
- Location intelligence → Job checkpoints: records progress
