Reproducible code for analyzing periurbanization trajectories of community health units in Kenya using multiple urbanization proxies.
# Classifying Peri-Urban Transition at Community Health Unit Level Using Multiple Geospatial Proxies in Coastal Kenya
This repository contains the full reproducible analysis code for:
> Makena P, Oluoch F, Ondiek RI, Gudda F, Keter A, Das J, Bhutta Z, Ngugi A.
> *Classifying peri-urban transition at Community Health Unit level using multiple geospatial proxies in coastal Kenya.*
---
## Study Overview
We conducted a longitudinal ecological analysis across **10 Community Health Units (CHUs)** in Kilifi County, Kenya (Kaloleni-Rabai Health and Demographic Surveillance System, KRHDSS), with annual observations from **2017 to 2024**.
Five publicly available geospatial proxy indicators were summarized within CHU boundaries:
- **VIIRS nighttime lights** – mean annual radiance
- **Sentinel 2 built-up area** – % of CHU area classified as built-up
- **WorldPop built-up area** – % of CHU area classified as built-up
- **WorldPop population density** – mean persons per km²
- **Degree of Urbanisation (GHS-SMOD)** – % of CHU area classified as urban
Key analyses:
1. Baseline and endline summary statistics (2017 vs 2024)
2. Year-to-year and cumulative percent change
3. Pearson correlations between proxy pairs
4. K-means consensus classification (peri-urban vs rural)
---
## Repository Structure
```
.
├── data/
│ ├── raw/
│ └── interim/
├── results/
│ ├── figures/
│ └── tables/
├── src/
│ ├── 01_build_panel.py
│ ├── 02_descriptive_tables.py
│ ├── 03_change_metrics.py
│ ├── 04_correlations.py
│ ├── 05_clustering_consensus.py
│ └── 06_make_figures.py
├── run_all.py
├── requirements.txt
├── environment.yml
└── LICENSE
```
---
## Data
Proxy values were extracted in **QGIS 3.28.3** using zonal statistics on CHU boundary polygons and exported as CSV files. Place these in `data/raw/`:
| File | Source | Description |
|------|--------|-------------|
| `viirs_nighttime_lights.csv` | VIIRS/NPP | Mean annual radiance per CHU |
| `sentinel2_builtup.csv` | ESA …