Symptom
Observational adm0_obs.parquet (CHIRPS-CHIRTS-ERA5) ships 2 rows per (iso3, variable, year, month) for disputed-claimant countries. A country gets its main gaul0 polygon row plus each disputed sliver it claims — both admin1/admin2 = NULL — so a naive WHERE iso3='KEN' returns 2 adm0 rows and consumers double-count/plot.
Root cause
R/observational/3_extract_obs_admin.R:245 sets zone_id = gaul0_code at adm0. Disputed slivers carry their own gaul0 code attributed to a claimant iso3 in the boundaries:
135 Ilemi → KEN137 + SSD160
100 Abyei → SSD160 + SDN161
110 Bīr Ṭawīl → EGY120 + SDN161
133 Hala'Ib → EGY120 + SDN161
- (W. Sahara excluded)
Authoritative mapping: R/misc/calc_disputed_weights.R (has obs-grid cell-count weight logic). terra::zonal returns mean/sd only (no pixel count, but the rasterized adm0 yields cell counts as calc_disputed_weights.R shows). adm0-only — adm1/adm2 are keyed by finer gaul1/gaul2.
Producers affected: 3_extract_obs_admin.R (monthly), 4_aggregate_obs_admin_periods.R (periods); publish via 6_publish_obs_to_s3.R.
Status — pipeline fix ON HOLD
This is not a pipeline-local fix. How disputed territory is attributed/aggregated affects every admin-extracted table in the AAA Atlas (exposure, hazard, hazard_exposure, observational, …) and is politically sensitive, so it needs an Atlas-wide convention rather than a one-pipeline patch.
Escalated to Brayden for a convention call: AdaptationAtlas/data-management#3
Until the convention is set, consumers keep the client-side GROUP BY / AVG dedup. Do not implement producer dedup here until the convention is decided.
Symptom
Observational
adm0_obs.parquet(CHIRPS-CHIRTS-ERA5) ships 2 rows per (iso3, variable, year, month) for disputed-claimant countries. A country gets its main gaul0 polygon row plus each disputed sliver it claims — bothadmin1/admin2 = NULL— so a naiveWHERE iso3='KEN'returns 2 adm0 rows and consumers double-count/plot.Root cause
R/observational/3_extract_obs_admin.R:245setszone_id = gaul0_codeat adm0. Disputed slivers carry their own gaul0 code attributed to a claimant iso3 in the boundaries:135Ilemi → KEN137 + SSD160100Abyei → SSD160 + SDN161110Bīr Ṭawīl → EGY120 + SDN161133Hala'Ib → EGY120 + SDN161Authoritative mapping:
R/misc/calc_disputed_weights.R(has obs-grid cell-count weight logic).terra::zonalreturns mean/sd only (no pixel count, but the rasterized adm0 yields cell counts ascalc_disputed_weights.Rshows). adm0-only — adm1/adm2 are keyed by finer gaul1/gaul2.Producers affected:
3_extract_obs_admin.R(monthly),4_aggregate_obs_admin_periods.R(periods); publish via6_publish_obs_to_s3.R.Status — pipeline fix ON HOLD
This is not a pipeline-local fix. How disputed territory is attributed/aggregated affects every admin-extracted table in the AAA Atlas (exposure, hazard, hazard_exposure, observational, …) and is politically sensitive, so it needs an Atlas-wide convention rather than a one-pipeline patch.
Escalated to Brayden for a convention call: AdaptationAtlas/data-management#3
Until the convention is set, consumers keep the client-side
GROUP BY / AVGdedup. Do not implement producer dedup here until the convention is decided.