mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
- Snapshot all four versioned docs sections at v6.1.0; master continues to serve as "Next" (lastVersion: current, banner: unreleased) so editing master keeps updating the canonical URLs - Enable the previously-disabled components plugin and version it - Rename stale "developer_portal" references to "developer_docs" across package.json scripts, manage-versions.mjs, theme files (DocVersionBadge, DocVersionBanner), DOCS_CLAUDE.md, and README.md (URL backward-compat redirect /developer_portal/* preserved) - Add admin_docs version scripts; drop dead "tutorials" plugin id from the version badge - Generalize fixVersionedImports in manage-versions.mjs to walk every section's snapshot and rewrite ../../src/ and ../../data/ imports, catching admin_docs and components files that previous version cuts would have broken - Remove orphan files: developer_portal_versions.json, tutorials_versions.json, and stray empty versions.json files inside components/ and developer_docs/ content directories
41 lines
1.9 KiB
Plaintext
41 lines
1.9 KiB
Plaintext
---
|
|
title: Country Map Tools
|
|
sidebar_position: 10
|
|
version: 1
|
|
---
|
|
|
|
import countriesData from '../../../data/countries.json';
|
|
|
|
# The Country Map Visualization
|
|
|
|
The Country Map visualization allows you to plot lightweight choropleth maps of
|
|
your countries by province, states, or other subdivision types. It does not rely
|
|
on any third-party map services but would require you to provide the
|
|
[ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) codes of your country's
|
|
top-level subdivisions. Comparing to a province or state's full names, the ISO
|
|
code is less ambiguous and is unique to all regions in the world.
|
|
|
|
## Included Maps
|
|
|
|
The current list of countries can be found in the src
|
|
[legacy-plugin-chart-country-map/src/countries.ts](https://github.com/apache/superset/blob/master/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts)
|
|
|
|
The Country Maps visualization already ships with the maps for the following countries:
|
|
|
|
<ul style={{columns: 3}}>
|
|
{countriesData.countries.map((country, index) => (
|
|
<li key={index}>{country}</li>
|
|
))}
|
|
</ul>
|
|
|
|
## Adding a New Country
|
|
|
|
To add a new country to the list, you'd have to edit files in
|
|
[@superset-ui/legacy-plugin-chart-country-map](https://github.com/apache/superset/tree/master/superset-frontend/plugins/legacy-plugin-chart-country-map).
|
|
|
|
1. Generate a new GeoJSON file for your country following the guide in [this Jupyter notebook](https://github.com/apache/superset/blob/master/superset-frontend/plugins/legacy-plugin-chart-country-map/scripts/Country%20Map%20GeoJSON%20Generator.ipynb).
|
|
2. Edit the countries list in [legacy-plugin-chart-country-map/src/countries.ts](https://github.com/apache/superset/blob/master/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts).
|
|
3. Install superset-frontend dependencies: `cd superset-frontend && npm install`
|
|
4. Verify your countries in Superset plugins storybook: `npm run plugins:storybook`.
|
|
5. Build and install Superset from source code.
|