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 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 (except for Madagascar).
Included Maps
The current list of countries can be found in the src plugin-chart-country-map/src/countries.ts
The Country Maps visualization already ships with the maps for the following countries:
- Afghanistan
- Aland
- Albania
- Algeria
- American Samoa
- Andorra
- Angola
- Anguilla
- Antarctica
- Antigua And Barbuda
- Argentina
- Armenia
- Australia
- Austria
- Azerbaijan
- Bahrain
- Bangladesh
- Barbados
- Belarus
- Belgium
- Belize
- Benin
- Bermuda
- Bhutan
- Bolivia
- Bosnia And Herzegovina
- Botswana
- Brazil
- Brunei
- Bulgaria
- Burkina Faso
- Burundi
- Cambodia
- Cameroon
- Canada
- Cape Verde
- Central African Republic
- Chad
- Chile
- China
- Colombia
- Comoros
- Cook Islands
- Costa Rica
- Croatia
- Cuba
- Cyprus
- Czech Republic
- Democratic Republic Of The Congo
- Denmark
- Djibouti
- Dominica
- Dominican Republic
- Ecuador
- Egypt
- El Salvador
- Equatorial Guinea
- Eritrea
- Estonia
- Ethiopia
- Fiji
- Finland
- France
- France (with overseas)
- France (regions)
- French Polynesia
- Gabon
- Gambia
- Germany
- Ghana
- Greece
- Greenland
- Grenada
- Guatemala
- Guinea
- Guyana
- Haiti
- Honduras
- Hungary
- Iceland
- India
- Indonesia
- Iran
- Israel
- Italy
- Italy (regions)
- Italy (regions and autonomous provinces)
- Ivory Coast
- Japan
- Jordan
- Kazakhstan
- Kenya
- Korea
- Kuwait
- Kyrgyzstan
- Laos
- Latvia
- Lebanon
- Lesotho
- Liberia
- Libya
- Liechtenstein
- Lithuania
- Luxembourg
- Macedonia
- Madagascar
- Malawi
- Malaysia
- Maldives
- Mali
- Malta
- Marshall Islands
- Mauritania
- Mauritius
- Mexico
- Moldova
- Mongolia
- Montenegro
- Montserrat
- Morocco
- Mozambique
- Myanmar
- Namibia
- Nauru
- Nepal
- Netherlands
- New Caledonia
- New Zealand
- Nicaragua
- Niger
- Nigeria
- Northern Mariana Islands
- Norway
- Oman
- Pakistan
- Palau
- Panama
- Papua New Guinea
- Paraguay
- Peru
- Philippines
- Philippines (regions)
- Poland
- Portugal
- Qatar
- Republic Of Serbia
- Romania
- Russia
- Rwanda
- Saint Lucia
- Saint Pierre And Miquelon
- Saint Vincent And The Grenadines
- Samoa
- San Marino
- Sao Tome And Principe
- Saudi Arabia
- Senegal
- Seychelles
- Sierra Leone
- Singapore
- Slovakia
- Slovenia
- Solomon Islands
- Somalia
- South Africa
- Spain
- Sri Lanka
- Sudan
- Suriname
- Sweden
- Switzerland
- Syria
- Taiwan
- Tajikistan
- Tanzania
- Thailand
- The Bahamas
- Timorleste
- Togo
- Tonga
- Trinidad And Tobago
- Tunisia
- Turkey
- Turkey (regions)
- Turkmenistan
- Turks And Caicos Islands
- Uganda
- UK
- Ukraine
- United Arab Emirates
- United States Minor Outlying Islands
- United States Virgin Islands
- Uruguay
- USA
- Uzbekistan
- Vanuatu
- Venezuela
- Vietnam
- Wallis And Futuna
- Yemen
- Zambia
- Zimbabwe
Adding a New Country
To add a new country to the list, you'd have to edit files in @superset-ui/plugin-chart-country-map.
- Most countries need no correction at all - check whether yours already resolves via a plain
lookup in
scripts/maps/catalog.pybefore writing anything. - If it needs a fix (a renamed region, a relocated territory, a replacement data source, ...),
add a module under
scripts/maps/countries/- the existing modules there are the best reference for the pattern. Then import the module and add it toREGISTRYinscripts/maps/countries/__init__.py; unregistered modules are ignored by the build. - Install the Python geo stack (
pip install geopandas shapely matplotlib requests), then regenerate the GeoJSON files,countries.tsanddocs/data/countries.json:cd superset-frontend && npm run update-maps. Iterate on just your country with a rendered preview viapython3 plugins/plugin-chart-country-map/scripts/build_maps.py --countries <name> --preview. - Install superset-frontend dependencies:
cd superset-frontend && npm install - Verify your countries in Superset plugins storybook:
npm run plugins:storybook. - Build and install Superset from source code.