Overview
The Water module monitors surface water body availability across the IGAD region using satellite-derived data from the USGS FEWS NET Water Point Monitoring system. Each monitored water point has a time series of water depth and condition classifications, which are critical for food security assessments in pastoral and agro-pastoral areas.
Data Model
Each record in the Water model represents a single water point at a single date:
| Field | Type | Description |
|---|---|---|
| pointId | Integer | USGS water point identifier |
| name | String | Water body / point name |
| country | FK (IGADCountry) | Country the point belongs to |
| date | Date | Observation date |
| lat / lon | Float | Geographic coordinates |
| rain | Float | Rainfall at the point (mm) |
| evap | Float | Evaporation (mm) |
| depth | Float (%) | Raw water depth as % of maximum |
| scaled_depth | Float (%) | Final scaled depth percentage |
| median_depth | Float (%) | Long-term median depth percentage |
| area | Float (ha, nullable) | Water body area in hectares |
| condition | Choice | Status classification (see below) |
Unique constraint: ['pointId', 'date'] — one record per point per date (time series).
Condition Classifications
| Condition | Marker Colour | Meaning |
|---|---|---|
| Good | Green | Water body at normal or above-normal level |
| Watch | Yellow | Below normal; monitor closely |
| Alert | Orange | Significantly below normal; access risk |
| Near Dry | Red | Very low water level; critical access concern |
| Seasonally Dry | Grey | Expected to be dry at this time of year |
Views Available
- Map (
/water/map) — Interactive Leaflet map (ArcGIS World Imagery basemap) with colour-coded markers for each water point. Clicking a marker opens an info panel and loads a historical depth time-series chart (AmCharts 5) via a GraphQL query. - Data Table (
/water/data) — Paginated table (50 per page) of all water point records, filterable by country and point name. Exportable to CSV and Excel. - Chart (
/water/chart) — Time-series line chart for a single water point showing historical depth trends. - Upload (
/water/upload/) — CSV import. The country is derived automatically from a 2-letter prefix in the filename (e.g.,KE_→ Kenya,ET_→ Ethiopia,SO_→ Somalia,SD_→ Sudan,SS_→ South Sudan,UG_→ Uganda).
Data Collection
python manage.py collect_water # Fetch latest data from USGS API
python manage.py collect_water --test-connection # Test API connectivity
python manage.py collect_water --use-ip # Use IP address instead of hostname (fallback)
python manage.py water_bulk # Bulk import from CSV file
python manage.py water_bulk_delete # Delete water point records
The collect_water command queries the USGS FEWS NET water point API (edcintl.cr.usgs.gov/geoengine5/v1/waterpoint/data) for the last 365 days across Kenya, Ethiopia, Somalia, Sudan, South Sudan, and Uganda. New records are bulk-inserted and records older than one year are automatically pruned.
GraphQL Integration
The map uses the system GraphQL endpoint (/q) to fetch historical water depth data when a user clicks a marker, enabling dynamic chart updates without a page reload.
Relevance
Water availability is a primary determinant of livestock survival in pastoral areas and household health in arid regions. Alert and Near Dry conditions during peak dry seasons — particularly in Somalia, Kenya, and Ethiopia — are strong indicators of humanitarian need.