You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @tienhung2812, I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together!
To correct the incorrect Vietnam province names in the country map chart, you need to update the NAME_1 property in the GeoJSON data. For example, to change "Đông Nam Bộ" to "Đồng Nai", you would modify the relevant feature in the GeoJSON file. Similarly, update the other incorrect names as follows:
Change "Đông Nam Bộ" to "Đồng Nai" for ISO code VN-39.
Change "Đông Bắc" to "Bắc Kạn" for ISO code VN-53.
Change "Đồng Bằng Sông Hồng" to "Hưng Yên" for ISO code VN-66.
You can automate this process using a Python script with GeoPandas:
importgeopandasasgpd# Load your GeoJSON filevietnam=gpd.read_file('path_to_your_geojson_file')
# Function to replace namesdefreplace_name(gdf, old_name, new_name):
gdf.loc[gdf['NAME_1'] ==old_name, 'NAME_1'] =new_name# Replace incorrect namesreplace_name(vietnam, 'Đông Nam Bộ', 'Đồng Nai')
replace_name(vietnam, 'Đông Bắc', 'Bắc Kạn')
replace_name(vietnam, 'Đồng Bằng Sông Hồng', 'Hưng Yên')
# Save the updated GeoJSONvietnam.to_file('path_to_updated_geojson_file', driver='GeoJSON')
This script will help ensure that all province names are correctly updated in your GeoJSON file [1][2].
Screenshot
Description
On Vietnam country map chart, there are a list of incorrect mapping ISO-code with the name
Source: https://en.wikipedia.org/wiki/ISO_3166-2:VN
Design input
The text was updated successfully, but these errors were encountered: