How adityakamthe/jalpravah works
Jal Pravah is an urban flood-forecasting and safe-navigation platform for Pune, with a broader municipal map and analysis portal. The principal backend workflow is a rainfall-source chain feeding a 0–3 hour nowcast, a coupled surface/sewer simulation, and corridor hazard outputs for publication. The frontend presents nowcasts, maps, history, alerts, and routing; its Pune dashboard also computes a client-side safe route. README-described features include citizen reports, CAP alerts, and live forecast streaming, though their backend wiring is not shown in the sampled excerpts.
Main entry points: App.jsx Portal application · worker.py Nowcast worker · engine.py Coupled simulation · PuneNowcastDashboard.jsx Pune nowcast dashboard
Components 34
Forecast and Hydraulics
- Nowcast worker
backend/jalpravah/worker.py - Rain source chain
backend/jalpravah/radar/sources/chain.py - Radar sources
backend/jalpravah/radar/sources/base.py - Rain nowcast
backend/jalpravah/radar/nowcast.py - Coupled simulation
backend/jalpravah/coupling/engine.py - Surface flow
backend/jalpravah/terrain/surface2d.py - Inlet exchange
backend/jalpravah/coupling/inlets.py - Sewer hydraulics
backend/jalpravah/network/hydraulics.py - River tailwater
backend/jalpravah/network/tailwater.py - Terrain conditioning
backend/jalpravah/terrain/conditioning.py - Report feedback
backend/jalpravah/alerts/feedback.py - CAP alerts
backend/jalpravah/alerts/rules.py - Forecast stream
scripts/api_server.py - Forecast store
Hazards and Routing
- Hazard extraction
backend/jalpravah/coupling/extract.py - Hazard tiers
scripts/hazard_tiers.py - Safe route engine
backend/jalpravah/nav/router.py - Road graph
backend/jalpravah/nav/osm_graph.py
Municipal Portal
- Portal application
src/App.jsx - Pune nowcast dashboard
src/components/PuneNowcastDashboard.jsx - Flood analysis map
src/components/DeepAnalysisMap.jsx - Municipal command portal
src/components/AdminPanel.jsx - 3D flood map
src/components/FloodMap3D.jsx - Alert banner
src/components/AlertBanner.jsx - Historical data
src/components/HistoricalData.jsx - Citizen reporter
src/components/CitizenReport.jsx
Location and Integrations
- Location context
src/context/LocationContext.jsx - City search
src/components/GlobalSearchBar.jsx - City analysis
src/utils/dynamicLocation.js - Terrain service
src/utils/bhuvan-api.js - Client flood model
src/utils/floodML.js
Other components
- Municipal user
- Rainfall providers
- Weather and map services
Connections 38
- Municipal user → Portal application: uses portal
src/App.jsx - Portal application → Pune nowcast dashboard: routes to
src/App.jsx - Portal application → Flood analysis map: routes to
src/App.jsx - Portal application → Municipal command portal: routes to
src/App.jsx - Portal application → 3D flood map: routes to
src/App.jsx - Portal application → Historical data: routes to
src/App.jsx - Portal application → Alert banner: renders
src/App.jsx - Portal application → Client flood model: refreshes model
src/App.jsx - Nowcast worker → Rain source chain: selects source
backend/jalpravah/worker.py - Rain source chain → Radar sources: selects providers
backend/jalpravah/radar/sources/chain.py - Nowcast worker → Rain nowcast: generates forecast
backend/jalpravah/worker.py - Rain nowcast → Radar sources: reads rainfall
backend/jalpravah/radar/nowcast.py - Nowcast worker → Coupled simulation: runs simulation
backend/jalpravah/worker.py - Nowcast worker → Terrain conditioning: conditions terrain
backend/jalpravah/worker.py - Coupled simulation → Surface flow: updates flow
backend/jalpravah/coupling/engine.py - Coupled simulation → Inlet exchange: uses inlet exchange
backend/jalpravah/coupling/engine.py - Coupled simulation → Sewer hydraulics: advances network
backend/jalpravah/coupling/engine.py - Sewer hydraulics → River tailwater: uses stage
backend/jalpravah/network/hydraulics.py - Nowcast worker → Hazard extraction: extracts corridors
backend/jalpravah/worker.py - Hazard extraction → Hazard tiers: classifies depth
backend/jalpravah/coupling/extract.py - Pune nowcast dashboard → Hazard tiers: uses hazard scale
src/components/PuneNowcastDashboard.jsx - Pune nowcast dashboard → Safe route engine: calculates route
src/components/PuneNowcastDashboard.jsx - Safe route engine → Road graph: uses road graph
backend/jalpravah/nav/router.py - City search → Location context: updates location
src/components/GlobalSearchBar.jsx - City search → City analysis: analyzes city
src/components/GlobalSearchBar.jsx - City analysis → Terrain service: fetches terrain
src/utils/dynamicLocation.js - City analysis → Weather and map services: queries services
src/utils/dynamicLocation.js - City search → Weather and map services: fetches forecast
src/components/GlobalSearchBar.jsx - Flood analysis map → Location context: reads location
src/components/DeepAnalysisMap.jsx - Flood analysis map → Client flood model: uses flood model
src/components/DeepAnalysisMap.jsx - Municipal command portal → Client flood model: uses flood model
src/components/AdminPanel.jsx - Rainfall providers → Rain source chain: provides rainfall
- Nowcast worker → Forecast store: publishes forecast
backend/jalpravah/worker.py - Citizen reporter → Report feedback: submits reports
README.md - Report feedback → Sewer hydraulics: adjusts blockage
README.md - Nowcast worker → Forecast stream: broadcasts runs
README.md - Forecast stream → Pune nowcast dashboard: pushes updates
README.md - CAP alerts → Municipal user: issues warnings
README.md