esosedi / 3166 Goto Github PK
View Code? Open in Web Editor NEWThis is the best source for iso3166 codes you can found. I am sure.
License: MIT License
This is the best source for iso3166 codes you can found. I am sure.
License: MIT License
Please, take a look at the region iso "DF" in Brazil in portuguese. It is writen "Federal District". The translated name is "Distrito Federal".
The data/iso-3166-2.json file is missing entries for AW, AX, BL, BV, CC, CS, CW, CX, EH, HM, MF, NC, NF, PF, SJ, and SX. I could be wrong, but it seems like this list is intended to include all codes from the standard.
See ISO Country Codes Collection or GeoNames or ISO 3166-1 alpha-2 - Wikipedia for details.
Hello, thanks very much for this excellent resource.
I believe the iso for Mexico City / Ciudad de Mexico is out of date.
It is currently listed as "DIF" (Distrito Federal), but I believe it should be "CMX".
Reference: https://en.wikipedia.org/wiki/ISO_3166-2:MX
Hello,
Koreas and Indonesia have their very old names. I've fixed some of the occurrences in the following patch.
France (FR): 3381670 → should be 3017382
Gibraltar (GI): 2411585 → should be 2411586
P.S. Thanks for the great dataset!
const data = require('iso3166-2-db').getDataSet();
module.js:515
throw err;
^
Error: Cannot find module '../data/iso3166-2.json'
at Function.Module._resolveFilename (module.js:513:15)
at Function.Module._load (module.js:463:25)
at Module.require (module.js:556:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/willfarrell/Development/github/react-intl-material/node_modules/iso3166-2-db/lib/defaultDataset.js:3:12)
at Module._compile (module.js:612:30)
at Object.Module._extensions..js (module.js:623:10)
at Module.load (module.js:531:32)
at tryModuleLoad (module.js:494:12)
at Function.Module._load (module.js:486:3)
Hi there,
are there any Typescript typings for this library? I am new to Typescript and just want to use this library in my React Typescript project.
The Ukrainian Oblast Dnipropetrovsk has the name "Днепропетров��кая область" in the Russian language, which looks to me like an encoding issue.
See: https://github.com/esosedi/3166/blob/master/regions/UA/ru.json
The regions in Portuguese were not translated from English. We can see for example the structure of:
https://github.com/esosedi/3166/blob/master/regions/US/pt.json
"District of Columbia" should be "Distrito de Columbia"
"New York" should be "Nova Iorque"
"Hawaii" should be "Havaí"
"North Carolina" should be "Carolina do Norte"
Other countries also were wrong.
Just FYI I found some inconsistencies between geonames and this repo, one of them being in the title, see for example https://en.wikipedia.org/wiki/Innlandet.
As of 2014 Kenya has 47 counties instead of 8 provinces.
https://www.iso.org/obp/ui#iso:code:3166:KE
Hi,
I just found some incorrect/outdated ISO_3166-2 code for Vietnam regions, I also checked it with OSM Overpass API and I can confirm some regions code is incorrect/outdated (Just some regions, not all Vietnam regions).
Data reference from https://en.wikipedia.org/wiki/ISO_3166-2:VN.
For example, on Wikipedia and OSM Overpass, Can Tho
ISO_3166-2 code is CT
, but on esosedi/3166 it code is 48
.
You can check this code through below Overpass queries:
VN-48
: https://overpass-turbo.eu/s/11zFVN-CT
: https://overpass-turbo.eu/s/11zGI can help to correct it, but It seems the repository has a lot of duplicates json
data, so do I need to update all of them or do I only need to update the data/iso3166-2.json
file?
Thank you so much!
https://en.wikipedia.org/wiki/ISO_3166-2:FR
» node -e "db=require('iso3166-2-db')" -i
> db.getDataSet()['FR'].regions.map(({name, iso}) => ({name, iso}))
[
{ name: "Provence-Alpes-Côte d'Azur", iso: 'U' },
{ name: 'Pays de la Loire', iso: 'R' },
{ name: 'Île-de-France', iso: 'J' },
{ name: 'Corsica', iso: 'H' },
{ name: 'Centre Region, France', iso: 'F' },
{ name: 'Brittany', iso: 'E' },
{ name: 'Bourgogne-Franche-Comté', iso: 'BFC' },
{ name: 'Nouvelle-Aquitaine', iso: 'NAQ' },
{ name: 'Normandie', iso: 'NOR' },
{ name: 'Grand Est', iso: 'GES' },
{ name: 'Occitanie', iso: 'OCC' },
{ name: 'Hauts-de-France', iso: 'HDF' },
{ name: 'Auvergne-Rhône-Alpes', iso: 'ARA' }
]
Should be
[
{ name: "Provence-Alpes-Côte d'Azur", iso: 'PAC' },
{ name: 'Pays de la Loire', iso: 'PDL' },
{ name: 'Île-de-France', iso: 'IDF' },
{ name: 'Corsica', iso: 'COR' },
{ name: 'Centre Region, France', iso: 'CVL' },
{ name: 'Brittany', iso: 'BRE' },
{ name: 'Bourgogne-Franche-Comté', iso: 'BFC' },
{ name: 'Nouvelle-Aquitaine', iso: 'NAQ' },
{ name: 'Normandie', iso: 'NOR' },
{ name: 'Grand Est', iso: 'GES' },
{ name: 'Occitanie', iso: 'OCC' },
{ name: 'Hauts-de-France', iso: 'HDF' },
{ name: 'Auvergne-Rhône-Alpes', iso: 'ARA' }
]
CN codes are no longer numeric - https://en.wikipedia.org/wiki/ISO_3166-2:CN
On file https://github.com/esosedi/3166/blob/master/i18n/dispute/UN/zh.json
Name for Spain (ES) is indicated as Chinese
.
It should be 西班牙
.
Hi,
Currently the ISO 3166-2 codes for Poland are wrong (in iso3166-2-db/data/iso3166-2.json
).
See https://www.iso.org/obp/ui/#iso:code:3166:PL for more information:
Change of subdivision code from PL-DS to PL-02, PL-KP to PL-04, PL-LB to PL-08, PL-LD to PL-10, PL-LU to PL-06, PL-MA to PL-12, PL-MZ to PL-14, PL-OP to PL-16, PL-PD to PL-20, PL-PK to PL-18, PL-PM to PL-22, PL-SK to PL-26, PL-SL to PL-24, PL-WN to PL-28, PL-WP to PL-30 and PL-ZP to PL-32;
In case it may be useful for your patching, an array [from, to]:
[["PL-DS", "PL-02"], ["PL-KP", "PL-04"], ["PL-LB", "PL-08"], ["PL-LD", "PL-10"], ["PL-LU", "PL-06"], ["PL-MA", "PL-12"], ["PL-MZ", "PL-14"], ["PL-OP", "PL-16"], ["PL-PD", "PL-20"], ["PL-PK", "PL-18"], ["PL-PM", "PL-22"], ["PL-SK", "PL-26"], ["PL-SL", "PL-24"], ["PL-WN", "PL-28"], ["PL-WP", "PL-30"], ["PL-ZP", "PL-32"]];
The iso-3166-2 subdivision codes for Albania are wrong: They should be zero-padded numeric values between 01 and 12, as specified by the standard (https://www.iso.org/obp/ui/#iso:code:3166:AL). Instead, they are given as 2-character strings like "EL" and "VL".
It looks like the error was adopted during the import from geolocated.org, which seems to use these non-ISO subdivision codes: http://geolocated.org/AL/EL/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.