# shatakshi192007-sketch/sih-2026 architecture

> Architecture diagram of the GitHub repository shatakshi192007-sketch/sih-2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shatakshi192007-sketch/sih-2026
- Repository: https://github.com/shatakshi192007-sketch/sih-2026

## Overview

This repository is a flood-risk decision-support prototype. Its concrete workflow is to ingest village records from CSV, calculate hazard and vulnerability, derive risk/red-zone status and relocation priority, then add ML cluster tiers. A separate scenario module modifies rainfall and road conditions before rerunning that analysis. The README also describes capacity assessment, visualization, resource allocation, and response planning as goals; the sampled implementation does not show those as separate capabilities. Evidence is limited to the README and the four sampled Python files.

Main entry points: [`data_ingestor.py`](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/data_ingestor.py) (CSV Ingestor), [`ml_risk_engine.py`](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/ml_risk_engine.py) (Risk Clustering), [`scenario_engine.py`](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/scenario_engine.py) (Climate Scenarios), [`risk_engine.py`](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/risk_engine.py) (Risk Scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data Ingestion"]
  node_ingestor["CSV Ingestor<br/>[data_ingestor.py]"]
end

subgraph group_assessment["Risk Assessment"]
  node_ml["Risk Clustering<br/>[ml_risk_engine.py]"]
  node_risk["Risk Scoring<br/>[risk_engine.py]"]
end

subgraph group_planning["Scenario Planning"]
  node_scenario["Climate Scenarios<br/>[scenario_engine.py]"]
end

node_gis(("GIS Data Provider"))
node_authority(("Response Authorities"))

node_gis -->|"provides CSV"| node_ingestor
node_ingestor -->|"clusters records"| node_ml
node_ml -->|"calculates status"| node_risk
node_scenario -->|"reruns analysis"| node_ml
node_authority -.->|"submits records"| node_ingestor
node_authority -.->|"plans scenarios"| node_scenario

click node_ingestor "https://github.com/shatakshi192007-sketch/sih-2026/blob/main/data_ingestor.py"
click node_ml "https://github.com/shatakshi192007-sketch/sih-2026/blob/main/ml_risk_engine.py"
click node_risk "https://github.com/shatakshi192007-sketch/sih-2026/blob/main/risk_engine.py"
click node_scenario "https://github.com/shatakshi192007-sketch/sih-2026/blob/main/scenario_engine.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_ingestor toneBlue
class node_ml,node_risk toneAmber
class node_scenario toneMint
class node_gis,node_authority toneIndigo
```

## Components

### Data Ingestion

- [CSV Ingestor](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/data_ingestor.py): `data_ingestor.py`

### Risk Assessment

- [Risk Clustering](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/ml_risk_engine.py): `ml_risk_engine.py`
- [Risk Scoring](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/risk_engine.py): `risk_engine.py`

### Scenario Planning

- [Climate Scenarios](https://github.com/shatakshi192007-sketch/sih-2026/blob/main/scenario_engine.py): `scenario_engine.py`

### Other components

- **GIS Data Provider**
- **Response Authorities**

## Connections

- GIS Data Provider → CSV Ingestor: provides CSV (evidence: `data_ingestor.py`)
- CSV Ingestor → Risk Clustering: clusters records (evidence: `data_ingestor.py`)
- Risk Clustering → Risk Scoring: calculates status (evidence: `ml_risk_engine.py`)
- Climate Scenarios → Risk Clustering: reruns analysis (evidence: `scenario_engine.py`)
- Response Authorities → CSV Ingestor: submits records (evidence: `README.md`)
- Response Authorities → Climate Scenarios: plans scenarios (evidence: `README.md`)
