stefangabos / world_countries

Constantly updated lists of world countries and their associated alpha-2, alpha-3 and numeric country codes as defined by the ISO 3166 standard, available in CSV, JSON , PHP, SQL and XML formats, in multiple languages and with national flags included; also available are the ISO 3166-2 codes of provinces/ states associated with the countries

Home Page:http://stefangabos.github.io/world_countries/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ISO 3166-2 Province/State/Region Offical Breakout of Countires

asjones987 opened this issue · comments

I am not sure what kind of scripting you have to bread this out, but what about adding the ISO 3166-2 as a seperate data file

Pulling data from the official ISO website is probably a good idea anyway as it is the official source.

https://www.iso.org/obp/ui/#iso:pub:PUB500001:en

depending on your script you cold pull AA -ZZ and get all official ISO names/countries and the breakout of countries. like province/state/region etc.

I would ask you to remove the * from the sub area code names

Tanzania
https://www.iso.org/obp/ui/#iso:code:3166:TZ

Subdivision category 3166-2 code Subdivision name Local variant Language code Romanization system Parent subdivision
region TZ-01 Arusha   sw    
region TZ-19 Coast   en    
region TZ-02 Dar es Salaam   sw    
region TZ-03 Dodoma   sw    
region TZ-27* Geita   sw    
region TZ-04 Iringa   sw    
region TZ-05 Kagera   sw    
region TZ-06 Kaskazini Pemba   sw    
region TZ-07 Kaskazini Unguja   sw    
region TZ-28* Katavi   sw    
region TZ-08 Kigoma   sw    
region TZ-09 Kilimanjaro   sw    
region TZ-10 Kusini Pemba   sw    
region TZ-11 Kusini Unguja   sw    
region TZ-12 Lindi   sw    
region TZ-26* Manyara   sw    
region TZ-13 Mara   sw    
region TZ-14 Mbeya   sw    
region TZ-15 Mjini Magharibi   sw    
region TZ-16 Morogoro   sw    
region TZ-17 Mtwara   sw    
region TZ-18 Mwanza   sw    
region TZ-29* Njombe   sw    
region TZ-06 Pemba North   en    
region TZ-10 Pemba South   en    
region TZ-19 Pwani   sw    
region TZ-20 Rukwa   sw    
region TZ-21 Ruvuma   sw    
region TZ-22 Shinyanga   sw    
region TZ-30* Simiyu   sw    
region TZ-23 Singida   sw    
region TZ-31 Songwe   en    
region TZ-31 Songwe   sw    
region TZ-24 Tabora   sw    
region TZ-25 Tanga   sw    
region TZ-07 Zanzibar North   en    
region TZ-11 Zanzibar South   en    
region TZ-15 Zanzibar West   en

i can't crawl that source. it's made with react or something.

Wikipeida does not have them all. Not finding a good current comprehensive list on most other standards sites.... there is this one though.
https://www.ip2location.com/free/iso3166-2

that looks decent and i can set it up so that whenever there's an update i could download, unzip and parse the file
i'll have an update on this soon
thanks for finding the source!

so, i parsed that file and was about to commit it when i realized that it contains mostly names in english and not in local language...
maybe there's an even better list somewhere?

Not finding a good other list.... also realized the ip2location list does not have the subcategory type.....

is anybody using subcategories?

i think what most people want is the list from ip2location

Here's another list. They have subcategories also - see here for Hungary, and they seem to have proper local names with accents and everything. It also means that I'll have to include subcategories, as you mentioned.