Skip to main content

国家地图(Country Map)可视化

国家地图可视化允许您按省份、州或其他细分类型绘制您国家的轻量级色阶地图。 它不依赖于任何第三方地图服务,但要求您提供国家顶级细分的 ISO-3166-2代码。与省份或州的全名相比,ISO 代码的歧义较小,并且对世界上所有地区都是唯一的。

包含的地图

当前国家列表可以在 src legacy-plugin-chart-country-map/src/countries.ts 找到。

国家地图可视化已经随附了以下国家的地图:

  • 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 (regions)
  • French Polynesia
  • Gabon
  • Gambia
  • Germany
  • Ghana
  • Greece
  • Greenland
  • Grenada
  • Guatemala
  • Guinea
  • Guyana
  • Haiti
  • Honduras
  • Hungary
  • Iceland
  • India
  • Indonesia
  • Iran
  • Israel
  • Italy
  • Italy (regions)
  • 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
  • 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

添加新国家

要将新国家添加到列表中,您必须编辑 @superset-ui/legacy-plugin-chart-country-map中的文件。

  1. 根据 this Jupyter notebook 中的指南为您的国家生成新的 GeoJSON 文件。
  2. 编辑 legacy-plugin-chart-country-map/src/countries.ts 中的国家列表。
  3. 安装 superset-frontend 依赖项:cd superset-frontend && npm install
  4. 在 Superset plugins storybook 中验证您的国家:npm run plugins:storybook
  5. 从源代码构建并安装 Superset。