This project builds an automated, end-to-end GIS and machine learning pipeline to analyze water point infrastructure risk across Kenya, with a focused application in Nairobi County.
# 🚰 Automated GIS-ML System for Water Infrastructure Risk in Kenya
This project builds an automated, end-to-end GIS and machine learning pipeline to analyze water point infrastructure risk across Kenya, with a focused application in Nairobi County.
Interact on Kepler .
View on ArcGIS online:
---
Map Preview
---
## 1. Project Objective
The primary goal was to build a **scalable, automated geospatial and machine learning workflow** to assess water point infrastructure risks **across Kenya**, identifying patterns of non-functionality, underserved zones, and failure risk nationwide.
Nairobi County was designated as a **high-priority focus area** for:
- Targeted filtering of high-risk points
- Visualization of priority zones
- Actionable recommendations for urban WASH interventions
Key deliverables:
- Spatial SQL automation for service area coverage and clustering
- Predictive ML model for water point failure risk
- Interactive maps and GIS-ready exports
- Prioritization insights for rehabilitation and policy
## 2. Data Sources & Ingestion
**Datasets**:
- WPdx Kenya water points (CSV): 21,953 points with attributes (`status_clean`, `install_year`, `water_tech_clean`, `pop_served_500m`, `is_urban`, etc.) Time period of the dataset:01 January 2011 - 01 December 2024. Modified: 14 December 2025
- WorldPop 2020 population raster (`ken_ppp_2020.tif`): ~100 m gridded population counts
- GADM Kenya Admin Level 1 boundaries (shapefile): 47 counties, including Nairobi (`NAME_1 = 'Nairobi'`)
**Ingestion**:
- Water points → PostGIS table `water_points` (GeoPandas + `to_postgis`)
- Population raster → `population_raster` (`raster2pgsql`, tiled, SRID 4326)
- Admin boundaries → `admin_boundaries`
- Nairobi subset created via `ST_Intersects` → `water_points_nairobi` (~11 points initially, expanded with buffer to ~25)
All data processed in PostgreSQL/PostGIS.
## 3. Spatial Analysis & Automation (Kenya-wide)
**Nationwide workflows**:
1. **Service area coverage**
- PL/ …