lukes / ISO-3166-Countries-with-Regional-Codes

ISO 3166-1 country lists merged with their UN Geoscheme regional codes in ready-to-use JSON, XML, CSV data sets
Other
2.1k stars 3.35k forks source link

Group entries #45

Open duboism opened 2 years ago

duboism commented 2 years ago

Hello,

ISO 3166 defines countries in the usual sense and some of their subdivisions. However there is no link between a subdivision and the "main" entity. For instance:

Therefore I think it might be a good idea to add a column to store that information. I understand it might be a tricky issue (it's probably why the ISO doesn't do that) but I find this useful. We should probably pay attention to the chosen terms.

Any thoughts ?

P.S.: thanks for this useful list.

lukes commented 2 years ago

Thank you for this suggestion! The data in this repository is compiled from existing data sets, rather than curated or edited in any form. This is something that I'm keen to retain. Are you aware of any existing authoritative datasets that link the data that we could refer to?

BStrauss3 commented 2 years ago

The canonical (ISO) list is here:

https://www.iso.org/iso-3166-country-codes.html, follow the link for the OBP. Those are the ISO 3166-1 codes, the familiar 2, 3, and numeric. E.g.

India: IN, IND, 356

If you follow the OBP, you will also find the ISO3166-2 sub-division codes, e.g. https://www.iso.org/obp/ui/#iso:code:3166:IN

Kerala is IN-KL

Interestingly, official language codes and lots of other data is present in some entries.

BStrauss3 commented 2 years ago

Following https://www.iso.org/obp/ui/#iso:pub:PUB500001:en to Martinique, https://www.iso.org/obp/ui/#iso:code:3166:MQ the entry says "Remark part 2 No subdivisions relevant for this standard. Included also as a subdivision of France (FR-MQ)."

https://www.iso.org/obp/ui/#iso:code:3166:GL does NOT indicate a relationship with DK (https://www.iso.org/obp/ui/#iso:code:3166:DK)

duboism commented 2 years ago

@lukes, If I'm correct ISO 3166 part 1 indicates if a territory is independent or not so that's a start. This is reflected in the Wikipedia page used in the code (see the "Independent column"). By the way, according to this, Taiwan is not independent which may provide an answer to #43 (similarly, Martinique and Greenland are listed as not independent). I thinks that part 2 of ISO 3166 may indicates some links but I have to dig a bit on that.

@BStrauss3, thanks for your comments.