highcharts / map-collection-dist

Other
30 stars 38 forks source link

ISO 3166-2 codes for all country GeoJSON files #149

Open AndySpeedCurve opened 1 month ago

AndySpeedCurve commented 1 month ago

I know you support HASC codes for regional information currently in the country GeoJSON map files. But HASC was created by G. Law who is unfortunately no longer with us, the codes are now maintained by his daughter, but aren't actively maintained in a while. I think it would be wise to supplement the HASC codes by adding ISO 31660-2 codes, they are more robustly maintained and supported. The Statoids website has a dataset with relevant ISO codes that match HASC for doing this.

KacperMadej commented 1 month ago

Hi @AndySpeedCurve

Thank you for the enhancement suggestion.

Currently we are adding new and updating maps using OpenStreetMap as the main source, so if the codes are there we should be able to make them a part of the map files. If the codes are missing in OSM the fastest way is to contribute and add them.

If there is a map or a list of maps that you would like to see prioritized over the rest of the Map Collection please leave a comment.

Internal note: Add the ISO 3166-2 codes note in the internal docs and scripts.

zeman commented 1 month ago

@KacperMadej That sounds great! As far as I can tell, all the ISO3166-2 codes are already in OSM. Here's an example subdivision for New Zealand. It would be fantastic if we could then reference the ISO3166-2 code in HighMaps and either highlight the subdivision area or place a point at the centre of the subdivision.

KacperMadej commented 1 month ago

@zeman All our maps in TopoJSON format (and some in all formats) have hc-middle-lon and hc-middle-lat properties for each map feature/region/area to place dataLabels in the center so you could use that as the centre of the subdivision. Sometimes the placement is adjusted to avoid placing the label outside of the labeled region or to move it into the center of the main area (e.g. France mainland's center instead of the European bbox center that includes Corsica or World bbox center that lands in the middle of the Atlantic Ocean).

We are adding ISO3166-2 codes from OSM to some new maps that will be release soon. We will be adding more of those codes in the future maps for sure. At the moment I am unable to confirm if we will go through all the maps to just to add those codes in the near future.

If you are looking forward to this feature don't forget to leave a thumbs up in the top comment so we can prioritize the feature request accordingly.