Zone-stratified SHAP explainability and 5-wave temporal analysis of multidimensional poverty clustering in Tanzania (NPS 2008–2021), extending Sende et al. (2025, IEEE Access) with interpretable, PCA-free feature attribution and an interactive Streamlit dashboard.
# Explaining Poverty Clusters Across Space and Time
*A Zone-Stratified SHAP Analysis of Tanzania's National Panel Survey (2008/09–2020/21)*
**Author:** Aniket Kumar Pradhan, NTU Singapore
**Supervisor:** Prof. Snehanshu Saha, APPCAIR, BITS Pilani Goa
**Base paper:** Sende, Saha & Uwimbabazi (2025), *Spatial Distribution of Poverty Clusters and Its Prediction Algorithms*, IEEE Access
---
## What This Is
This project extends a poverty-clustering methodology (K-Means + Stacked Ensemble) with **SHAP explainability** across all **5 NPS waves (2008–2021)** and **7 administrative zones** of Tanzania. It answers: *which household features drive the poverty classification in each zone, and how do those drivers change over 12 years?*
**→ Start here: Final_Report.md** — the consolidated analysis with all findings and caveats.
**→ Interactive dashboard:** see Quick Start below.
---
## Quick Start: Dashboard
The dashboard reads pre-computed output files — no heavy ML dependencies needed.
```bash
# Install dashboard dependencies only (streamlit, pandas, plotly, openpyxl)
pip install -r requirements_dashboard.txt
# Launch
streamlit run app.py
```
Three panels:
- **Zone Selector** — pick a wave and zone(s) to view poverty-rate, cluster composition, and top features
- **SHAP Explorer** — interactive heatmap and bar chart of zone-stratified feature importance, with a full-feature / no-geo toggle and per-household strip plots
- **Temporal Drift** — five-wave comparison highlighting the electricity_source vs rural_urban convergence trend
> **Note:** the dashboard requires the pre-computed output files in `baseline_replication/outputs/` and `shap_analysis/outputs/`. If those directories are empty (e.g., a fresh clone with `.gitignore` excluding outputs), run the pipeline first — see Reproduction below.
---
## Key Finding
`electricity_source` rose from a near-irrelevant feature (SHAP importance 0.009 in 2008) to the single strongest policy-actionable poverty discriminato …