Validates the existing literature-calibrated UHICorrector against Landsat
8/9 Collection 2 Level 2 surface temperatures at 15 Dar zone centroids
(2020-2024, 707 cloud-masked samples across 13 zones). Finding: the
synthetic model systematically overpredicts UHI at valley/coastal Dar —
Jangwani LST hot-season anomaly −5.5°C vs synthetic model +3.8°C implied
delta; Msasani LST −5.9°C vs synthetic +1.8°C. Surface-temperature rank
order (Tandale +3.6°C hottest; Jangwani and Msasani coolest) contradicts
the "settlement_type=informal → high UHI" heuristic.
This commit ships:
- src/downscaling/uhi_lst_model.py: new UHILSTCorrector with the same
correct_temperature() interface. Direct per-zone LST lookup (zone
hot-season anomaly × Voogt & Oke 2003 midpoint LST_TO_AIR_SCALE=0.5)
with XGBoost fallback for zones outside LST coverage (DAR-KIN, DAR-VIN).
- src/downscaling/__init__.py: factory + get_zone_uhi_range() helper.
UHI_MODEL env var picks synthetic or lst at instance time; default
…
Pipeline was claiming to be adaptable but hardcoded Dar references sat
inside the "DO NOT CHANGE" files. A forker would hit an empty zones list,
a missing era5 file, and the weekly-review prompt would still say "for
Dar es Salaam". Now config.py is the only place that needs editing.
- config.py: add PRIMARY_CITY, PRIMARY_CITY_SLUG, slug_for() helper;
PRIMARY_CITY in ZONES runtime check so a bad edit fails fast
- src/pipeline.py: DAR_ZONES to ACTIVE_ZONES derived from PRIMARY_CITY;
ERA5 path and weekly-review prompt are now config-driven
- scripts/fetch_era5land.py (renamed from _dar): config-driven bbox and
filename via --city; rewrote extract_zone_data to extract_all_zones
(opens each NetCDF file once per month instead of once per zone, 15x
fewer opens for a 20-year fetch)
- scripts/train_neural_pricer.py: fix buggy "Dar es Salaam" to "dar" slug
that would have broken ERA5 file resolution for any fork; raise WBGT
fallback 30.0 to 35.0 for tropical defaults
- tests/eval_…
Expand Dar es Salaam to 15 zones, retrain neural pricer on ERA5-Land
Added 10 new zones: Manzese, Tandale, Buguruni, Vingunguti, Mbagala
(informal), Kariakoo (commercial), Ubungo, Magomeni (mixed), Mikocheni,
Masaki (formal). Each with real coordinates, population, exposure data.
Neural model retrained on 15,450 samples (15 zones × 20 years ERA5-Land).
Rank correlation 0.929. Informal settlements priced 2.6x higher than
formal neighborhoods ($3,660 vs $1,394/worker/year).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Retrain neural actuarial model on ERA5-Land 9km data (20 years)
ERA5-Land provides 9km resolution vs NASA POWER's 55km — resolves
2 distinct grid cells across Dar es Salaam (north vs south).
20 years (2005-2024) of daily data: temperature, dewpoint, wind,
solar radiation, precipitation.
Results after retraining:
- Rank correlation: 0.985 (near-perfect zone ordering)
- Jangwani (informal) $8,538 vs Kinondoni (formal) $1,550 — 5.5x spread
- Model correctly prices UHI-amplified zones much higher
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add neural actuarial pricing engine trained on real Dar es Salaam data
Three-headed temporal neural model (LSTM encoder + Neural EVT hazard +
WHO/ILO vulnerability + CANN pricing) trained on 20 years of NASA POWER
daily climate data for 5 Dar es Salaam zones.
Key results:
- Jangwani (informal, +4.5C UHI) priced highest at $5,305/worker/yr
- Kinondoni (formal, +1C UHI) priced lowest at $2,776/worker/yr
- Basis risk learned: informal 0.53 > mixed 0.43 > formal 0.30
- Neural correction (delta_NN) is modest: -0.9% to -4.0% vs GLM baseline
- Rank correlation 0.914 on held-out validation data
Architecture: ~230K params, 910 KB saved model. CANN skip connection
means delta_NN=0 reproduces the existing ActuarialPricer formula exactly.
Falls back to GLM if model not found.
Based on: Chen et al. (Management Science 2024), EQRN (Pasche & Engelke
2024), CANN (Richman & Wuthrich), ISO 7243 occupational heat stress.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>