How manaswi-510/jaldharma works
Jal Dharma AI is a water-management decision-support system. Its documented workflow loads village, demand, weather, and infrastructure data; predicts village demand; models the distribution network and reachable supply; then allocates scarce water, measures fairness, and visualizes results. The checked-in runtime code supports data loading, prediction, spatial queries, graph/max-flow analysis, and maps. Optimization, justice metrics, scenario simulation, and a dashboard are documented capabilities but have no identifiable implementation files in this tree. Connections for those stages follow the README; source-level links are limited to excerpted code.
Main entry points: connection.py Database connection · predict.py Demand prediction · network_builder.py Network builder · water_graph.py Graph and max flow
Components 15
Data foundation
- Water datasets
data/synthetic - Data loader
src/database/load_data.py - PostgreSQL + PostGIS
- Database connection
src/database/connection.py
Demand forecasting
- Demand prediction
src/prediction/predict.py
GIS and network
- Spatial queries
src/gis/spatial_queries.py - Network builder
src/gis/network_builder.py - Graph and max flow
src/gis/water_graph.py
Allocation and justice
- Allocation optimization
- Equitable allocation
- Justice metrics
- Scarcity scenarios
Visualization
- Network maps
src/gis/visualize_network.py - Decision dashboard
Other components
- Decision-maker
Connections 22
- Water datasets → Data loader: loads from
src/database/load_data.py - Data loader → PostgreSQL + PostGIS: writes tables
src/database/load_data.py - Data loader → Database connection: gets engine
src/database/load_data.py - Demand prediction → PostgreSQL + PostGIS: reads and stores
src/prediction/predict.py - Demand prediction → Database connection: gets engine
src/prediction/predict.py - Spatial queries → PostgreSQL + PostGIS: queries geometry
src/gis/spatial_queries.py - Spatial queries → Database connection: gets engine
src/gis/spatial_queries.py - Network builder → PostgreSQL + PostGIS: loads network data
src/gis/network_builder.py - Network builder → Database connection: gets engine
src/gis/network_builder.py - Graph and max flow → PostgreSQL + PostGIS: loads network data
src/gis/water_graph.py - Graph and max flow → Database connection: gets engine
src/gis/water_graph.py - Decision-maker → Demand prediction: requests forecast
README.md - Decision-maker → Scarcity scenarios: chooses scenario
README.md - Demand prediction → Allocation optimization: provides demand
README.md - Graph and max flow → Allocation optimization: provides reachable supply
README.md - Allocation optimization → Equitable allocation: optimizes allocation
README.md - Equitable allocation → Justice metrics: measures fairness
README.md - Equitable allocation → Decision dashboard: visualizes allocation
README.md - Justice metrics → Decision dashboard: shows metrics
README.md - Network builder → Network maps: renders network
README.md - Network maps → Decision dashboard: supports decisions
README.md - Scarcity scenarios → Allocation optimization: compares outcomes
README.md