# zaim090606-ai/guardian-sih26191-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/zaim090606-ai/guardian-sih26191-dashboard
- Repository: https://github.com/zaim090606-ai/guardian-sih26191-dashboard

## Overview

This is an illustrative Streamlit dashboard for SIH26191 emergency hazard zoning and ranked relocation. The main workflow runs from user-adjusted scenario and scoring settings through synthetic geography, Guardian incident fusion, zone and habitation scoring, route checks, safe-site capacity and allocation, then presents maps, evidence, relocation, impact comparisons and briefings. Separate live connectors provide optional Chamoli hazard signals with cached or sample fallbacks. The graph follows the shown pipeline and documented capabilities; unsampled implementation details are represented only where the README or source index supports them.

Main entry points: [`app.py`](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/app.py) (Streamlit entry), [`pipeline.py`](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/pipeline.py) (Analysis pipeline), [`ui_relocation.py`](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_relocation.py) (Relocation tab), [`connectors/scenario.py`](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/scenario.py) (Scenario signals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_app["Streamlit entry<br/>[app.py]"]
  node_overview["Overview tab<br/>[ui_overview.py]"]
  node_map["Map tab<br/>[ui_map.py]"]
  node_map3d["3D map<br/>[ui_map3d.py]"]
  node_evidence_ui["Evidence tab<br/>[ui_evidence.py]"]
  node_relocation_ui["Relocation tab<br/>[ui_relocation.py]"]
  node_impact_ui["Impact tab<br/>[ui_impact.py]"]
  node_live_ui["Live scenario tab<br/>[ui_live.py]"]
  node_brief_ui["Brief tab<br/>[ui_brief.py]"]
  node_scorecard["Scorecard tab<br/>[ui_scorecard.py]"]
  node_method["Method and limits<br/>[ui_method.py]"]
end

subgraph group_analysis["Risk analysis"]
  node_pipeline["Analysis pipeline<br/>[pipeline.py]"]
  node_synthetic["Synthetic region data<br/>[data_gen.py]"]
  node_vulnerability["Vulnerability index<br/>[vulnerability.py]"]
  node_scoring["Risk and evidence scores<br/>[scoring.py]"]
  node_ahp["AHP weighting<br/>[ahp.py]"]
  node_route_safety["Route safety<br/>[route_safety.py]"]
end

subgraph group_relocation["Relocation planning"]
  node_buffer["Red-zone buffer<br/>[buffer.py]"]
  node_relocation_core["Capacity and allocation<br/>[relocation.py]"]
  node_report["Relocation reporting<br/>[report.py]"]
  node_robustness["Robustness analysis<br/>[robustness.py]"]
end

subgraph group_evidence["Ground evidence"]
  node_guardian["Guardian incident fusion<br/>[guardian_layer.py]"]
  node_review["Incident review<br/>[review.py]"]
  node_brief["Brief generation<br/>[brief.py]"]
end

subgraph group_live["Live signals"]
  node_connectors["Connector fallback and cache<br/>[base.py]"]
  node_region["Chamoli region filter<br/>[region.py]"]
  node_scenario["Scenario signals<br/>[scenario.py]"]
  node_weather["Weather and terrain feed<br/>[open_meteo.py]"]
  node_events["Earthquake and hazard events<br/>[events.py]"]
  node_sachet["SACHET alert feed<br/>[sachet.py]"]
end

node_user(("Dashboard user"))
node_external_feeds(("Public data services"))

node_user -->|"sets parameters"| node_app
node_app -->|"computes weights"| node_ahp
node_app -->|"runs analysis"| node_pipeline
node_pipeline -->|"generates region"| node_synthetic
node_pipeline -->|"applies index"| node_vulnerability
node_pipeline -->|"loads and fuses incidents"| node_guardian
node_pipeline -->|"calculates scores"| node_scoring
node_pipeline -->|"applies buffer"| node_buffer
node_pipeline -->|"checks routes"| node_route_safety
node_pipeline -->|"allocates capacity"| node_relocation_core
node_pipeline -->|"enriches incidents"| node_review
node_app -->|"renders tab"| node_overview
node_app -->|"renders tab"| node_map
node_app -->|"renders tab"| node_evidence_ui
node_app -->|"renders tab"| node_relocation_ui
node_app -->|"renders tab"| node_impact_ui
node_app -->|"renders tab"| node_live_ui
node_app -->|"renders tab"| node_brief_ui
node_app -->|"renders tab"| node_scorecard
node_app -->|"renders tab"| node_method
node_map -->|"offers 3D mode"| node_map3d
node_evidence_ui -->|"presents reviews"| node_review
node_relocation_ui -->|"shows allocations"| node_relocation_core
node_relocation_ui -->|"exports report"| node_report
node_relocation_ui -->|"shows robustness"| node_robustness
node_impact_ui -->|"compares scenarios"| node_pipeline
node_brief_ui -->|"generates briefing"| node_brief
node_live_ui -->|"shows signals"| node_scenario
node_scenario -->|"combines signals"| node_weather
node_scenario -->|"combines signals"| node_events
node_scenario -->|"includes alerts"| node_sachet
node_weather -->|"uses region coordinates"| node_region
node_events -->|"filters region"| node_region
node_sachet -->|"matches region"| node_region
node_external_feeds -.->|"provides observations"| node_weather
node_external_feeds -.->|"provides event data"| node_events
node_external_feeds -.->|"provides alerts"| node_sachet
node_weather -.->|"uses fallback cache"| node_connectors
node_events -.->|"uses fallback cache"| node_connectors

click node_app "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/app.py"
click node_overview "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_overview.py"
click node_map "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_map.py"
click node_map3d "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_map3d.py"
click node_evidence_ui "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_evidence.py"
click node_relocation_ui "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_relocation.py"
click node_impact_ui "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_impact.py"
click node_live_ui "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_live.py"
click node_brief_ui "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_brief.py"
click node_scorecard "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_scorecard.py"
click node_method "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_method.py"
click node_pipeline "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/pipeline.py"
click node_synthetic "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/data_gen.py"
click node_vulnerability "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/vulnerability.py"
click node_scoring "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/scoring.py"
click node_ahp "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ahp.py"
click node_route_safety "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/route_safety.py"
click node_buffer "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/buffer.py"
click node_relocation_core "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/relocation.py"
click node_report "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/report.py"
click node_robustness "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/robustness.py"
click node_guardian "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/guardian_layer.py"
click node_review "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/review.py"
click node_brief "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/brief.py"
click node_connectors "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/base.py"
click node_region "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/region.py"
click node_scenario "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/scenario.py"
click node_weather "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/open_meteo.py"
click node_events "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/events.py"
click node_sachet "https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/sachet.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_app,node_overview,node_map,node_map3d,node_evidence_ui,node_relocation_ui,node_impact_ui,node_live_ui,node_brief_ui,node_scorecard,node_method,node_user toneBlue
class node_pipeline,node_synthetic,node_vulnerability,node_scoring,node_ahp,node_route_safety toneAmber
class node_buffer,node_relocation_core,node_report,node_robustness toneMint
class node_guardian,node_review,node_brief toneRose
class node_connectors,node_region,node_scenario,node_weather,node_events,node_sachet,node_external_feeds toneIndigo
```

## Components

### Dashboard

- [Streamlit entry](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/app.py): `app.py`
- [Overview tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_overview.py): `ui_overview.py`
- [Map tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_map.py): `ui_map.py`
- [3D map](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_map3d.py): `ui_map3d.py`
- [Evidence tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_evidence.py): `ui_evidence.py`
- [Relocation tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_relocation.py): `ui_relocation.py`
- [Impact tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_impact.py): `ui_impact.py`
- [Live scenario tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_live.py): `ui_live.py`
- [Brief tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_brief.py): `ui_brief.py`
- [Scorecard tab](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_scorecard.py): `ui_scorecard.py`
- [Method and limits](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ui_method.py): `ui_method.py`

### Risk analysis

- [Analysis pipeline](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/pipeline.py): `pipeline.py`
- [Synthetic region data](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/data_gen.py): `data_gen.py`
- [Vulnerability index](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/vulnerability.py): `vulnerability.py`
- [Risk and evidence scores](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/scoring.py): `scoring.py`
- [AHP weighting](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/ahp.py): `ahp.py`
- [Route safety](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/route_safety.py): `route_safety.py`

### Relocation planning

- [Red-zone buffer](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/buffer.py): `buffer.py`
- [Capacity and allocation](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/relocation.py): `relocation.py`
- [Relocation reporting](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/report.py): `report.py`
- [Robustness analysis](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/robustness.py): `robustness.py`

### Ground evidence

- [Guardian incident fusion](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/guardian_layer.py): `guardian_layer.py`
- [Incident review](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/review.py): `review.py`
- [Brief generation](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/brief.py): `brief.py`

### Live signals

- [Connector fallback and cache](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/base.py): `connectors/base.py`
- [Chamoli region filter](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/region.py): `connectors/region.py`
- [Scenario signals](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/scenario.py): `connectors/scenario.py`
- [Weather and terrain feed](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/open_meteo.py): `connectors/open_meteo.py`
- [Earthquake and hazard events](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/events.py): `connectors/events.py`
- [SACHET alert feed](https://github.com/zaim090606-ai/guardian-sih26191-dashboard/blob/main/connectors/sachet.py): `connectors/sachet.py`

### Other components

- **Dashboard user**
- **Public data services**

## Connections

- Dashboard user → Streamlit entry: sets parameters (evidence: `README.md`)
- Streamlit entry → AHP weighting: computes weights (evidence: `app.py`)
- Streamlit entry → Analysis pipeline: runs analysis (evidence: `app.py`)
- Analysis pipeline → Synthetic region data: generates region (evidence: `pipeline.py`)
- Analysis pipeline → Vulnerability index: applies index (evidence: `pipeline.py`)
- Analysis pipeline → Guardian incident fusion: loads and fuses incidents (evidence: `pipeline.py`)
- Analysis pipeline → Risk and evidence scores: calculates scores (evidence: `pipeline.py`)
- Analysis pipeline → Red-zone buffer: applies buffer (evidence: `pipeline.py`)
- Analysis pipeline → Route safety: checks routes (evidence: `pipeline.py`)
- Analysis pipeline → Capacity and allocation: allocates capacity (evidence: `pipeline.py`)
- Analysis pipeline → Incident review: enriches incidents (evidence: `pipeline.py`)
- Streamlit entry → Overview tab: renders tab (evidence: `app.py`)
- Streamlit entry → Map tab: renders tab (evidence: `app.py`)
- Streamlit entry → Evidence tab: renders tab (evidence: `app.py`)
- Streamlit entry → Relocation tab: renders tab (evidence: `app.py`)
- Streamlit entry → Impact tab: renders tab (evidence: `app.py`)
- Streamlit entry → Live scenario tab: renders tab (evidence: `app.py`)
- Streamlit entry → Brief tab: renders tab (evidence: `app.py`)
- Streamlit entry → Scorecard tab: renders tab (evidence: `app.py`)
- Streamlit entry → Method and limits: renders tab (evidence: `app.py`)
- Map tab → 3D map: offers 3D mode (evidence: `ui_map.py`)
- Evidence tab → Incident review: presents reviews (evidence: `ui_evidence.py`)
- Relocation tab → Capacity and allocation: shows allocations (evidence: `ui_relocation.py`)
- Relocation tab → Relocation reporting: exports report (evidence: `ui_relocation.py`)
- Relocation tab → Robustness analysis: shows robustness (evidence: `ui_relocation.py`)
- Impact tab → Analysis pipeline: compares scenarios (evidence: `ui_impact.py`)
- Brief tab → Brief generation: generates briefing (evidence: `ui_brief.py`)
- Live scenario tab → Scenario signals: shows signals (evidence: `ui_live.py`)
- Scenario signals → Weather and terrain feed: combines signals (evidence: `connectors/scenario.py`)
- Scenario signals → Earthquake and hazard events: combines signals (evidence: `connectors/scenario.py`)
- Scenario signals → SACHET alert feed: includes alerts (evidence: `connectors/scenario.py`)
- Weather and terrain feed → Chamoli region filter: uses region coordinates (evidence: `connectors/open_meteo.py`)
- Earthquake and hazard events → Chamoli region filter: filters region (evidence: `connectors/events.py`)
- SACHET alert feed → Chamoli region filter: matches region (evidence: `connectors/sachet.py`)
- Public data services → Weather and terrain feed: provides observations (evidence: `README.md`)
- Public data services → Earthquake and hazard events: provides event data (evidence: `README.md`)
- Public data services → SACHET alert feed: provides alerts (evidence: `README.md`)
- Weather and terrain feed → Connector fallback and cache: uses fallback cache (evidence: `connectors/open_meteo.py`)
- Earthquake and hazard events → Connector fallback and cache: uses fallback cache (evidence: `connectors/events.py`)
