# sadman2762/riverguard architecture

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

- Interactive diagram: https://gitdiagram.com/sadman2762/riverguard
- Repository: https://github.com/sadman2762/riverguard

## Overview

RiverGuard is a web map for understanding Jamuna River bank erosion and prioritizing stretches for intervention. Its documented workflow brings satellite observations into historical and radar-based erosion assessments, adds environmental and population context for map clicks, then lets planners filter and rank stretches within a kilometre budget. The README also describes transparent risk and confidence information. Only the README is present, so component paths and implementation-level call relationships cannot be verified; edges below reflect documented capabilities and data relationships only.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mapping["Map Experience"]
  node_webmap["RiverGuard Map"]
  node_riskview["Risk and Confidence"]
end

subgraph group_assessment["Erosion Assessment"]
  node_historydata["Historical Erosion"]
  node_radardata["Radar Candidates"]
end

subgraph group_context["Place Context"]
  node_clickcontext["Spot Summary"]
  node_landcover["Land Cover"]
  node_soil["Topsoil"]
  node_population["People and Services"]
end

subgraph group_planning["Planning"]
  node_riskfilter["Risk Filter"]
  node_priorityplanner["Priority Planner"]
  node_rankedstretches["Ranked Stretches"]
end

node_people(("Map Users"))
node_jrc["JRC Surface Water"]
node_landsat["Landsat Imagery"]
node_nisar["NISAR Imagery"]
node_worldcover["ESA WorldCover"]
node_soilgrids["ISRIC SoilGrids"]
node_worldpop["WorldPop"]
node_osm["OpenStreetMap"]

node_people -->|"uses"| node_webmap
node_webmap -->|"shows"| node_riskview
node_jrc -->|"supplies water maps"| node_historydata
node_landsat -->|"supplies imagery"| node_historydata
node_nisar -->|"supplies imagery"| node_radardata
node_historydata -->|"provides risk"| node_riskview
node_radardata -->|"shows candidates"| node_webmap
node_people -->|"clicks spot"| node_clickcontext
node_clickcontext -->|"shows"| node_landcover
node_clickcontext -->|"shows"| node_soil
node_clickcontext -->|"shows nearby"| node_population
node_worldcover -->|"provides data"| node_landcover
node_soilgrids -->|"provides data"| node_soil
node_worldpop -->|"provides population"| node_population
node_osm -->|"provides services"| node_population
node_people -->|"selects risk"| node_riskfilter
node_riskfilter -->|"filters stretches"| node_webmap
node_people -->|"sets budget"| node_priorityplanner
node_priorityplanner -->|"ranks by exposure"| node_rankedstretches

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_webmap,node_riskview,node_people toneBlue
class node_historydata,node_radardata toneAmber
class node_clickcontext,node_landcover,node_soil,node_population toneMint
class node_riskfilter,node_priorityplanner,node_rankedstretches toneRose
class node_jrc,node_landsat,node_nisar,node_worldcover,node_soilgrids,node_worldpop,node_osm toneIndigo
```

## Components

### Map Experience

- **RiverGuard Map**
- **Risk and Confidence**

### Erosion Assessment

- **Historical Erosion**
- **Radar Candidates**

### Place Context

- **Spot Summary**
- **Land Cover**
- **Topsoil**
- **People and Services**

### Planning

- **Risk Filter**
- **Priority Planner**
- **Ranked Stretches**

### Other components

- **Map Users**
- **JRC Surface Water**
- **Landsat Imagery**
- **NISAR Imagery**
- **ESA WorldCover**
- **ISRIC SoilGrids**
- **WorldPop**
- **OpenStreetMap**

## Connections

- Map Users → RiverGuard Map: uses (evidence: `README.md`)
- RiverGuard Map → Risk and Confidence: shows (evidence: `README.md`)
- JRC Surface Water → Historical Erosion: supplies water maps (evidence: `README.md`)
- Landsat Imagery → Historical Erosion: supplies imagery (evidence: `README.md`)
- NISAR Imagery → Radar Candidates: supplies imagery (evidence: `README.md`)
- Historical Erosion → Risk and Confidence: provides risk (evidence: `README.md`)
- Radar Candidates → RiverGuard Map: shows candidates (evidence: `README.md`)
- Map Users → Spot Summary: clicks spot (evidence: `README.md`)
- Spot Summary → Land Cover: shows (evidence: `README.md`)
- Spot Summary → Topsoil: shows (evidence: `README.md`)
- Spot Summary → People and Services: shows nearby (evidence: `README.md`)
- ESA WorldCover → Land Cover: provides data (evidence: `README.md`)
- ISRIC SoilGrids → Topsoil: provides data (evidence: `README.md`)
- WorldPop → People and Services: provides population (evidence: `README.md`)
- OpenStreetMap → People and Services: provides services (evidence: `README.md`)
- Map Users → Risk Filter: selects risk (evidence: `README.md`)
- Risk Filter → RiverGuard Map: filters stretches (evidence: `README.md`)
- Map Users → Priority Planner: sets budget (evidence: `README.md`)
- Priority Planner → Ranked Stretches: ranks by exposure (evidence: `README.md`)
