mledoze / countries

World countries in JSON, CSV, XML and Yaml. Any help is welcome!
https://mledoze.github.io/countries/
Open Data Commons Open Database License v1.0
5.96k stars 1.27k forks source link

Duplicated ccn3 code for Trinidad and Tobago & Kosovo #126

Closed cumanacr closed 9 years ago

cumanacr commented 9 years ago

On ISO 3166-1 "780" code is assigned to Trinidad and Tobago

But on countries.json Kosovo had the same number assigned, something that IMHO isn't correct because is Trinidad and Tobago's code.

I look for the correct code but I had no luck so far, I can't find it

yackermann commented 9 years ago

@cumanacr here is the note about XK code: The code XK is being used by the European Commission,[19] Switzerland,[20] the Deutsche Bundesbank,[21] SWIFT,[22] and other organizations as a temporary country code for Kosovo.[23] wikipedia

That is why there is no ISO 3166-1 numeric code for Kosovo. As for the duplicate, I will patch it in a second. Thanks for spotting.

cumanacr commented 9 years ago

Yay :smile: thanks!!!

It's going to be empty?

"ccn3": "",
yackermann commented 9 years ago

@cumanacr jep.

cumanacr commented 9 years ago

@herrniemand perfect, this project is awesome, keep up the good work :+1:

yackermann commented 9 years ago

@cumanacr I just send email to ISO about situation with Kosovo. Because currently we have problem with ISO 3116-3 code, as it is not verified either. We will see they say.

cumanacr commented 9 years ago

Way better, maybe, they'll answer soon

yackermann commented 9 years ago

@cumanacr Reply from ISO:

In accordance with ISO 3166-1:2006, subclause 7.2, the ISO 3166 Maintenance Agency does not make any additions of new country or territory names to ISO 3166-1 if the source of the information is not the United Nations, i.e. if the name is not listed in either the UN Member States list (http://www.un.org/members/list.shtml#m) or the list "Country and Region Codes for Statistical Use" of the United Nations Statistics Division http://www.un.org/depts/unsd/methods/m49alpha.htm.

Currently, the ISO 3166 Maintenance Agency has received no information from the UN Headquarters that Kosovo has been added to any of the above lists.

Nonetheless, the ISO 3166-1 does allow for cases where an official code may not be allocated by permitting the use of "user-assigned" codes as indicated in 8.1.3 of ISO 3166-1. If users need code elements to represent country names not included in this part of ISO 3166, the series of letters AA, QM to QZ, XA to XZ, and ZZ, and the series AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ respectively. These users should inform the ISO 3166/MA of such use. The series of numeric country code numbers are assigned by the UN Statistics Division who also make available the series, 900 to 999, as "user-assigned" codes.

The ISO 3166/MA has received information that the CE Commission has allocated the alpha-2 user-assigned code "XK" to represent Kosovo in the interim of being recognized by the UN as a member state.

Yours sincerely,

Joseph Martinez Customer Services

yackermann commented 9 years ago

@cumanacr So basically we will have to remove alpha-3 and alpha-2 numeric codes from Kosovo.

mledoze commented 9 years ago

@herrniemand

So basically we will have to remove alpha-3 and alpha-2 numeric codes from Kosovo.

What do you mean?

yackermann commented 9 years ago

@mledoze I mean that Kosovo simply don't have 3116-1 alpha-3 and 3116-1 numberic codes. It has only temporally 3116-1 alpha-2 code XK requested by EU.

mledoze commented 9 years ago

@herrniemand I see. I'll only remove the ccn3 property because we have kos.geo.json and kos.svg.

yackermann commented 9 years ago

@mledoze ok.

ruimarinho commented 9 years ago

@mledoze / @herrniemand, shouldn't Kosovo's cca3 be listed as XKX until it is recognised by the UN, instead of KOS?

yackermann commented 9 years ago

@ruimarinho No. Because Kosovo has only temporally alpha-2 code XK. But since we already used faulty alpha-3 code for our linking and referencing, we decided to keep faulty code for data integrity.

mledoze commented 9 years ago

@ruimarinho: @herrniemand is right, please see my comment on 26 Feb.

ruimarinho commented 9 years ago

Right, but since XKX's usage is quite widespread (e.g. it is used by the European Commission), even if unofficially, I think it's more correct to keep this version instead of "KOS".

hackel commented 8 years ago

I just came across this issue while trying to update https://github.com/kherge-abandoned/lib-country (though this project looks better and is actually maintained!).

According to https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 "UNK identifies Kosovo residents to whom travel documents were issued by the United Nations Interim Administration in Kosovo (UNMIK)," though no source is given for this. If it can be verified, it might be more appropriate than KOS.

yackermann commented 8 years ago

@hackel Hm... I will open issue based on that fact.

ianknowles commented 3 years ago

UNK is not the correct code to use, should probably be XKX to identify Kosovo or data relating to (The only official source I can find correctly using ISO3 is the world bank using XKX). XKX correctly identifies it as an unofficial code ISO3 while official recognition is pending. As there is another field identifying it as user-defined its not correct to return an empty string for the numeric code either, should be one of the user-assigned range 900-999. I can't find anyone at all using numeric codes anymore so just going with 900 is fine.

UNK is used to identify passports issued by the UN Mission in Kosovo, while this is the code likely to be seen on travel documents it does not identify data relating to Kosovo, it identifies an issuing passport authority, and the UN prefix indicates a UN body. The list of passport codes is longer than the alpha 3 country list because it includes UN issuing bodies and overseas passports, GBD, GBN, GBO etc etc. It might be useful to someone to add a list of passport codes associated with a country but thats a seperate field.

EC stat division country codes listing XK: https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:Country_codes Digging into the EU stats division further https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units/countries#countries20 They provide country datasets here, unfortunately for every disputed terriority they have listed the ISO3_CODE as 2 character codes so Kosovo is XK. This is obviously wrong and frustrating to see and they've been doing it since 2001.

World bank using XKX: https://microdata.worldbank.org/index.php/catalog/3242 Unfortunately they also got it wrong on their api and used KSV https://microdata.worldbank.org/index.php/api/catalog/country_codes

For an additional headache the EU assigns its own country codes and for some reason adopted ISO except for Greece which uses the non-standard EL, while other parts of its stats division just use the standard GR: http://publications.europa.eu/code/en/en-370100.htm

Kosovo FIFA code KVX: https://en.wikipedia.org/wiki/FIFA_code

The IMF uses KOS https://www.imf.org/en/Countries/KOS but their stats division uses UVK https://dsbb.imf.org/egdds/country/UVK/category