An interactive data analysis project examining how Kenya's FY 2023/24 equitable share budget allocations compare across all 47 counties β both in absolute terms and per capita.
# π°πͺ Kenya County Budget Analysis
An interactive data analysis project examining how Kenya's FY 2023/24 equitable share budget allocations compare across all 47 counties β both in absolute terms and per capita.
Built with **Python**, **Pandas**, **Matplotlib**, **SciPy**, and **Streamlit**.
---
## π Key Findings
- **Lamu receives 4.5x more per person than Nairobi** (KES 18,605 vs KES 4,157) despite Nairobi receiving the largest absolute allocation (KES 20.07B)
- **Strong negative correlation** (r = -0.671) between county population and budget per person β larger counties are systematically underfunded per capita
- **North Eastern region** leads on per-capita allocation (avg KES 11,193/person), while **Nairobi region** ranks last (KES 4,157/person)
- **Gini coefficient of 0.168** indicates moderate inequality in per-capita budget distribution across counties
---
## π Dashboard Sections
| Section | Description |
|---|---|
| π Overview | All 47 counties ranked by budget per person, top 10 vs bottom 10 |
| π Regional Analysis | Budget comparison across Kenya's 8 regions |
| π Correlation & Gini | Lorenz curve, distribution, regression analysis |
| π― Quintile Analysis | Counties grouped into 5 equal bands, boxplots by region |
| π County Explorer | Look up any county vs national and regional averages |
| π Full Rankings | Filterable table with CSV export |
---
## ποΈ Project Structure
```
kenya_county_analysis/
βββ data/
β βββ county_data.csv # All 47 counties with population & budget
βββ notebooks/
β βββ analysis.py # Core analysis script
β βββ deep_analysis.py # Gini, regional, correlation & quintile analysis
βββ dashboards/ # Auto-generated chart outputs
βββ dashboard.py # Streamlit interactive dashboard
βββ requirements.txt
βββ README.md
```
---
## π¦ Data Sources
| Field | Source |
|---|---|
| Population | KNBS 2024 County Population Projections (based on 2019 Census) |
| Budget | FY 20 β¦