jtlevine commited on
Commit
f41bb4e
·
1 Parent(s): 997e400

Frontend: clarify threshold labels (city-wide default vs production per-zone)

Browse files
frontend/api/coverage-recommendation.ts CHANGED
@@ -3,10 +3,18 @@ import { neon } from '@neondatabase/serverless'
3
 
4
  const PRIMARY_CITY = 'Dar es Salaam'
5
 
6
- // City-wide P97 WBGT threshold from 20 years of ERA5-Land data.
7
- // ONE threshold for everyone (38.8°C). Informal zones are hotter so they
8
- // exceed it MORE often — Jangwani triggers 83 days/year vs Kinondoni 0.
9
- // This ensures the most vulnerable workers get paid FIRST and MOST.
 
 
 
 
 
 
 
 
10
  const CITY_P97_WBGT = 38.8
11
 
12
  // Real population estimates per zone based on Tanzania NBS 2024 census,
 
3
 
4
  const PRIMARY_CITY = 'Dar es Salaam'
5
 
6
+ // FALLBACK (THRESHOLD_MODE=global): city-wide P97 WBGT from 20 years of
7
+ // ERA5-Land data. Used only in the default-env fallback pathway.
8
+ //
9
+ // PRODUCTION (THRESHOLD_MODE=zone_specific, shipped April 2026): each zone
10
+ // carries its own P90 alert / P97 payout calibrated from its own 20-year
11
+ // UHI-corrected WBGT distribution. Example range: Jangwani alert 31.79°C /
12
+ // payout 32.54°C (valley); Vingunguti alert 37.74°C / payout 38.64°C (hot
13
+ // informal). Per-zone trigger frequencies normalize to ~10% alert / ~3%
14
+ // payout per year — the actuarial pattern used by ARC, CCRIF, and SEWA.
15
+ //
16
+ // This constant is only read if per-zone thresholds are unavailable.
17
+ // See climate-risk-engine/CLAUDE.md § "Trigger threshold mode".
18
  const CITY_P97_WBGT = 38.8
19
 
20
  // Real population estimates per zone based on Tanzania NBS 2024 census,
frontend/src/pages/Dashboard.tsx CHANGED
@@ -285,9 +285,9 @@ function StepOutput({
285
  {consec} of 5
286
  </span>
287
  <span style={{ color: '#8d909e' }}>Alert threshold</span>
288
- <span style={{ color: '#1b1e2d', fontVariantNumeric: 'tabular-nums' }}>35.1°C (UHI P90)</span>
289
  <span style={{ color: '#8d909e' }}>Payout threshold</span>
290
- <span style={{ color: '#1b1e2d', fontVariantNumeric: 'tabular-nums' }}>38.8°C (UHI P97)</span>
291
  <span style={{ color: '#8d909e' }}>Status</span>
292
  <span style={{ color: '#1b1e2d' }}>{status}</span>
293
  <span style={{ color: '#8d909e' }}>Forecast source</span>
 
285
  {consec} of 5
286
  </span>
287
  <span style={{ color: '#8d909e' }}>Alert threshold</span>
288
+ <span style={{ color: '#1b1e2d', fontVariantNumeric: 'tabular-nums' }}>35.1°C (city-wide default)</span>
289
  <span style={{ color: '#8d909e' }}>Payout threshold</span>
290
+ <span style={{ color: '#1b1e2d', fontVariantNumeric: 'tabular-nums' }}>38.8°C (city-wide default)</span>
291
  <span style={{ color: '#8d909e' }}>Status</span>
292
  <span style={{ color: '#1b1e2d' }}>{status}</span>
293
  <span style={{ color: '#8d909e' }}>Forecast source</span>