# zahinsyukran/dengue-breeding-prediction-fyp architecture

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

- Interactive diagram: https://gitdiagram.com/zahinsyukran/dengue-breeding-prediction-fyp
- Repository: https://github.com/zahinsyukran/dengue-breeding-prediction-fyp

## Overview

This is a Taiwan dengue early-warning dashboard: users select a district, date, and model; the app obtains weather inputs, estimates risk, and presents maps, summaries, and a forecast calendar. The README documents a separate spatially agnostic training workflow and its validation approach. Source excerpts are partial, so the graph omits uncertain internal wiring and treats documented training stages at notebook level.

Main entry points: [`frontend/app.py`](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py) (Streamlit dashboard), [`backend/model_train.ipynb`](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/model_train.ipynb) (Model training), [`backend/models`](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/tree/main/backend/models) (XGBoost assets), [`backend/data/taiwan_dengue_master_dataset.csv`](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/data/taiwan_dengue_master_dataset.csv) (Taiwan master data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Data and training"]
  node_dataset[("Taiwan master data")]
  node_training_notebook["Model training<br/>[model_train.ipynb]"]
  node_aggregation["Temporal aggregation<br/>[model_train.ipynb]"]
  node_validation["Robust validation<br/>[model_train.ipynb]"]
end

subgraph group_runtime["Forecast runtime"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
  node_weather_api["OpenWeather API"]
  node_nasa_api["NASA POWER API"]
  node_firebase[("Firebase config")]
  node_feature_engineering["Feature engineering<br/>[app.py]"]
  node_risk_inference["Risk prediction<br/>[app.py]"]
end

subgraph group_models["Model assets"]
  node_xgb_assets["XGBoost assets"]
  node_lstm_assets["LSTM assets"]
end

subgraph group_presentation["Dashboard results"]
  node_risk_map["Risk map<br/>[app.py]"]
  node_risk_summary["Risk summaries<br/>[app.py]"]
  node_weather_view["Weather overview<br/>[app.py]"]
  node_forecast_calendar["Forecast calendar<br/>[app.py]"]
end

node_user(("Dashboard user"))

node_dataset -->|"trains from"| node_training_notebook
node_training_notebook -->|"aggregates by date"| node_aggregation
node_training_notebook -->|"validates models"| node_validation
node_training_notebook -->|"saves model assets"| node_xgb_assets
node_training_notebook -->|"saves model assets"| node_lstm_assets
node_user -->|"selects options"| node_dashboard
node_dashboard -->|"requests forecast"| node_weather_api
node_dashboard -.->|"requests history"| node_nasa_api
node_dashboard -->|"reads NDVI config"| node_firebase
node_dashboard -->|"loads assets"| node_xgb_assets
node_dashboard -->|"loads assets"| node_lstm_assets
node_dashboard -->|"engineers features"| node_feature_engineering
node_feature_engineering -->|"provides features"| node_risk_inference
node_risk_inference -->|"provides risk levels"| node_risk_map
node_risk_inference -->|"provides risk results"| node_risk_summary
node_dashboard -->|"displays weather"| node_weather_view
node_dashboard -->|"builds calendar"| node_forecast_calendar
node_user -->|"views forecast"| node_risk_map
node_user -->|"views summary"| node_risk_summary

click node_dataset "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/data/taiwan_dengue_master_dataset.csv"
click node_training_notebook "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/model_train.ipynb"
click node_aggregation "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/model_train.ipynb"
click node_validation "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/model_train.ipynb"
click node_xgb_assets "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/tree/main/backend/models"
click node_lstm_assets "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/tree/main/backend/models"
click node_dashboard "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py"
click node_feature_engineering "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py"
click node_risk_inference "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py"
click node_risk_map "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py"
click node_risk_summary "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py"
click node_weather_view "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py"
click node_forecast_calendar "https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.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_dataset,node_training_notebook,node_aggregation,node_validation,node_user toneBlue
class node_dashboard,node_weather_api,node_nasa_api,node_firebase,node_feature_engineering,node_risk_inference toneAmber
class node_xgb_assets,node_lstm_assets toneMint
class node_risk_map,node_risk_summary,node_weather_view,node_forecast_calendar toneRose
```

## Components

### Data and training

- [Taiwan master data](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/data/taiwan_dengue_master_dataset.csv): `backend/data/taiwan_dengue_master_dataset.csv`
- [Model training](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/model_train.ipynb): `backend/model_train.ipynb`
- [Temporal aggregation](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/model_train.ipynb): `backend/model_train.ipynb`
- [Robust validation](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/backend/model_train.ipynb): `backend/model_train.ipynb`

### Forecast runtime

- [Streamlit dashboard](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py): `frontend/app.py`
- **OpenWeather API**
- **NASA POWER API**
- **Firebase config**
- [Feature engineering](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py): `frontend/app.py`
- [Risk prediction](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py): `frontend/app.py`

### Model assets

- [XGBoost assets](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/tree/main/backend/models): `backend/models`
- [LSTM assets](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/tree/main/backend/models): `backend/models`

### Dashboard results

- [Risk map](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py): `frontend/app.py`
- [Risk summaries](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py): `frontend/app.py`
- [Weather overview](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py): `frontend/app.py`
- [Forecast calendar](https://github.com/zahinsyukran/dengue-breeding-prediction-fyp/blob/main/frontend/app.py): `frontend/app.py`

### Other components

- **Dashboard user**

## Connections

- Taiwan master data → Model training: trains from
- Model training → Temporal aggregation: aggregates by date
- Model training → Robust validation: validates models
- Model training → XGBoost assets: saves model assets
- Model training → LSTM assets: saves model assets
- Dashboard user → Streamlit dashboard: selects options
- Streamlit dashboard → OpenWeather API: requests forecast
- Streamlit dashboard → NASA POWER API: requests history
- Streamlit dashboard → Firebase config: reads NDVI config
- Streamlit dashboard → XGBoost assets: loads assets
- Streamlit dashboard → LSTM assets: loads assets
- Streamlit dashboard → Feature engineering: engineers features
- Feature engineering → Risk prediction: provides features
- Risk prediction → Risk map: provides risk levels
- Risk prediction → Risk summaries: provides risk results
- Streamlit dashboard → Weather overview: displays weather
- Streamlit dashboard → Forecast calendar: builds calendar
- Dashboard user → Risk map: views forecast
- Dashboard user → Risk summaries: views summary
