mirror of
https://github.com/apache/superset.git
synced 2026-05-24 17:25:20 +00:00
Previously the build only emitted the ukr (Ukraine) worldview, so the worldview dropdown had a single option even though it claimed otherwise. Build now produces Admin 0 GeoJSON for every NE-published editorial: default, arg, bdg, bra, chn, deu, egy, esp, fra, gbr, grc, idn, ind, iso, isr, ita, jpn, kor, mar, nep, nld, pak, pol, prt, pse, rus, sau, swe, tur, twn, ukr, usa, vnm (33 total). NE does not publish per-worldview Admin 1 variants, so subdivisions within a country come from a single shared file. The frontend now always points Admin 1, regional aggregation, and composite URLs at the ukr-prefixed shared outputs regardless of the selected worldview — the worldview control only affects the world (Admin 0) map. - build.py: expand WORLDVIEWS_ADMIN_0 to 33 worldviews; main() builds Admin 0 for all of them, Admin 1 only for ukr - transformProps.ts: introduce SHARED_ADMIN1_WORLDVIEW = 'ukr'; pin all non-Admin-0 URLs to it - controlPanel.tsx: WORLDVIEW_LABELS now covers all 33 codes; unrecognized codes still fall back to raw code for forward-compat - transformProps.test.ts: cover shared-Admin1 contract (admin1+chn still resolves to ukr_admin1_*) - pre-commit: exclude .geo.json from check-added-large-files (existing rule only excluded .geojson and would block these ~2MB worldview files) - README + SIP: document the worldview model and check off Phase 1 item Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@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 questionsscripts/README.md— build pipeline operating principlesscripts/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