# Mini-Grid Site Prioritization Tool
A small, real-data tool that answers one concrete question for a solar
mini-grid / off-grid energy company operating in Kenya:
> **"Given limited capital, which county — or which specific
> constituency — should we invest in next?"**
Instead of guessing or relying on anecdote, this ranks all 47 Kenyan
counties by an **opportunity score** built from real government data,
now including a solar resource factor and Kenya's own official KOSAP
grid-remoteness classification, plus a finer-grained real
constituency-level ranking, and a Streamlit app so a non-technical
analyst can move the weight sliders themselves.
## Why this exists
Off-grid solar and mini-grid companies decide where to build using a mix
of intuition, sales-team anecdotes, and slow manual research. Meanwhile,
Kenya's own census data already contains the two most important numbers
for this decision — **how many people currently lack electricity, and
where** — nobody has bothered to turn it into a ranked, actionable
shortlist. That's the first-principles gap this fills.
## How it works
1. **Electrification rate per county** — real constituency-level
household electricity access percentages (2019 census data, published
via Stats Kenya), averaged across each county's constituencies.
2. **Population per county** — real KNBS 2019 census and 2023 projection
figures.
3. **Unelectrified population** = `population_2023 × (1 − electrification_rate)`
— the actual number of people in that county without power today.
4. **Solar resource tier** — a real, literature-based estimate of solar
irradiance (GHI) per county (see `data/county_solar_tier.csv` for full
citations). Higher solar resource means cheaper, more productive
mini-grid generation.
5. **Grid remoteness** — a real, official Government of Kenya/World Bank
classification: whether the county is one of the 14 formally
designated by the Kenya Off-Grid Solar Access Project (KOSAP) as
furthest from national grid infrastruct …