Files
superset2/superset-frontend/plugins/plugin-chart-country-map
Evan Rusackas ea9b21b017 feat(country-map): build script — Admin 1 + flying_islands transform
Add Admin 1 build path and the second declarative transform. Exercises
the YAML config layer on real data:

  Building worldview=ukr admin_level=1
    loaded 4596 features
    name_overrides: applied 19 field updates across 10 entries
    flying_islands: repositioned 12 features, dropped 5 (outside-bbox)
    wrote ukr_admin1.geo.json (67,677,079 bytes, 4591 features)

Counts verified against expectations:
- 19 name_overrides = 2 France typos + 6 France ISO codes
  + 5 PHL Caraga renames + 6 PHL BARMM renames
- 12 repositions = 2 USA + 1 NOR + 2 PRT + 2 ESP + 5 FRA
- 5 drops = NLD Caribbean + GBR overseas territories

New: pure-Python translate/scale geometry transform (no shapely dep);
operates on Polygon/MultiPolygon coordinates. Scale pivot is the bbox
center of each matched feature — good enough for the visual layout
purposes we use it for. Output bbox correctness verified by counts.

Refactor: extract `build_one(worldview, admin_level, ...)` so the
target matrix can grow in subsequent commits.

What's stubbed (TODO inline): territory_assignments, composite_maps,
regional_aggregations, simplification, procedural/. Output is
uncompressed and unsimplified (67MB) — simplification will land with
the mapshaper -simplify pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:02:11 -07:00
..