Geospatial decision pipeline for rural electrification in Kenya.
# Helios: Rural Electrification Decision Pipeline (Kenya)
A geospatial pipeline that scores ~71,000 grid cells in Turkana County, Kenya, and recommends one of three electrification pathways (grid extension, solar mini-grid, or off-grid solar) for each cell.
## Overview
Extending the national grid to remote, low-density areas is expensive, and in many rural parts of Kenya a mini-grid or standalone solar system reaches people faster and at lower cost than a grid connection. Choosing between these options at scale is a spatial problem: the right answer depends on local population, existing infrastructure, distance to the grid, and solar resource. Helios combines several public raster and vector layers, scores each cell of a fine grid, and assigns a recommended pathway with a rough cost and impact estimate so the trade-offs can be compared on a map.
## What it does
- Loads and harmonizes multiple raster and vector datasets to a common CRS and extent.
- Builds a regular ~1 km grid over the study county (Turkana) and clips it to the county boundary.
- Computes zonal statistics (mean population, nighttime lights, solar potential) for every grid cell.
- Computes distance from each cell to the nearest road, school, and health facility.
- Classifies each cell into grid extension, solar mini-grid, off-grid solar, or unpopulated, and attaches an urgency score, an estimated cost, and an impact estimate.
- Exports a model-ready table and a GeoJSON of recommendations, and renders an interactive Folium map of the results.
## Methods & techniques
**Study area and grid.** The pipeline targets Turkana County. It generates a regular grid at roughly 1 km spacing (0.01 degree cells in EPSG:4326), clips it to the county boundary, and works with each cell's centroid for distance calculations. The final recommendation layer in the notebook contains 71,287 cells.
**Data layers.** Per-cell features are drawn from:
- Population density raster (`ken_general_2020.tif`), used for mean …