Files
superset2/superset-frontend/plugins/plugin-chart-country-map
Evan Rusackas cb5bb69fa8 feat(country-map): build script — emit manifest.json describing outputs
Adds a manifest.json output the plugin can fetch at runtime to
populate worldview / country / region-set / composite dropdowns
dynamically. Adding a new entry to the YAML configs no longer requires
a plugin code change — re-run build.sh, manifest updates, plugin
controls reflect the new options.

Manifest schema:
  ne_pinned_tag, ne_pinned_sha, build_timestamp_utc
  worldviews: [<wv>, ...]
  admin_levels: [0, 1]
  countries_by_worldview: {<wv>: [<adm0_a3>, ...]}
  regional_aggregations: [{country, set_id, worldview, size_bytes}, ...]
  composites: [{id, worldview, size_bytes}, ...]

Sample current output:
  1 worldview (ukr), 211 countries with subdivisions, 4 regional sets,
  1 composite (france_overseas). Build pinned to NE v5.1.2.

Follow-up commit will replace the hardcoded choice tables in
controlPanel.tsx with manifest-driven options.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:06:30 -07:00
..

@superset-ui/plugin-chart-country-map

Modern country/region choropleth chart for Apache Superset. Replaces legacy-plugin-chart-country-map.

Status

🚧 Work in progress — see SIP_DRAFT.md in this directory for the full design rationale and implementation phases. This plugin lives in the same PR as the build pipeline that produces its data; both are currently scaffolded and being progressively fleshed out.

What it offers vs. the legacy plugin

Legacy New
Backend endpoint explore_json chart/data (modern)
Disputed-region handling Hardcoded NE editorial Configurable per-deployment + per-chart worldview (NE _ukr default)
Subdivisions level Country-only Country (Admin 0) and Subdivisions (Admin 1) and Aggregated regions
Data pipeline Jupyter notebook Reproducible script + YAML configs (see scripts/)
Per-deployment customization Fork required superset_config.COUNTRY_MAP block + chart-level controls
Composite maps (e.g. France-with-Overseas) Hardcoded in notebook Declarative in composite_maps.yaml
Regional aggregations (NUTS-1 etc.) Hardcoded Declarative in regional_aggregations.yaml

Layout

src/
  index.ts          — package entry; exports CountryMapChartPlugin and types
  types.ts          — TypeScript types for form data + transform props
  CountryMap.tsx    — React component; renders the SVG chart
  plugin/
    index.ts        — ChartPlugin class with metadata
    buildQuery.ts   — modern chart/data query builder
    controlPanel.tsx— form controls (worldview, admin level, country, ...)
    transformProps.ts — form_data → renderer props
scripts/            — build pipeline (NE shapefile → simplified GeoJSON outputs)
SIP_DRAFT.md        — design draft for the eventual SIP issue

See also

  • SIP_DRAFT.md — design rationale, audit of legacy notebook, obsolescence findings, open questions
  • scripts/README.md — build pipeline operating principles
  • scripts/config/*.yaml — declarative transform configs (5 schemas for the 5 transform categories)
  • scripts/procedural/README.md — escape hatch for edge cases YAML can't express