SQL + Python analysis of water infrastructure equity across 27.6M people: data reconciliation, EDA, choropleth mapping, and well-contamination risk modeling.
# 💧 Maji Ndogo Water Access Analytics
**SQL + Python analysis of water infrastructure equity across a country of 27.6 million people — data cleaning, EDA, choropleth mapping, and a well-contamination risk model**
> Interactive dashboard: dashboard/water_access_dashboard.html
---
## Problem
Maji Ndogo's water ministry has years of operational data — water source inventories, site visits, well-quality tests, an infrastructure improvement program, and (historically) crime records — spread across four inconsistent workbook exports of the same tracking system. No single export was complete. This project reconciles that data into one clean source, then answers the questions a ministry actually needs answered: who has basic water access and who doesn't, where is the gap worst, how contaminated is the groundwater, and how effectively has the $154.5M improvement program been spent.
**Research questions:**
- What share of the population has *basic* water access, by the WHO/JMP standard, and where is it worst?
- Which provinces have the longest queues, and does queue time alone explain the access gap?
- How contaminated is well water, and can contamination risk be predicted from non-lab features?
- How much has the improvement program invested, and how efficiently, by vendor and improvement type?
---
## Dataset
Source: four separate Excel exports of the same water-services tracking system (~39,650 water sources, 60,146 site visits, 17,383 well-quality tests, 25,398 completed infrastructure projects, 95 vendors, and historical crime records), covering 5 provinces and 31 towns.
**None of the four exports was individually complete** — each was missing different columns or entire tables that another export had. `notebooks/01_data_cleaning.ipynb` documents the full column-level reconciliation: which export supplied which field, and why (e.g. one export turned out to be an earlier snapshot of the same records, not a competing version of the truth).
| Table | Rows | What i …