olahol / iso-3166-2.js

Lookup information about ISO-3166-2 subdivisions
MIT License
108 stars 41 forks source link

Countries not assigned subdivisions #6

Closed derduher closed 8 years ago

derduher commented 9 years ago

Sometimes is handy to know which countries explicitly don't have subdivisions. I have cross referenced your data.csv with codes.csv

cc Name in data.csv in codes.csv Neither Subdiv second assign comments
AI Anguilla YES NO
AN YES Disolved - Became BQ CW SX http://en.wikipedia.org/wiki/ISO_3166-2:AN
AQ Antarctica YES NO Antarctic
AS American Samoa YES NO US-AS
AW Aruba YES NO NL-AW
AX Åland Islands YES NO FI-01
BL Saint Barthélemy YES NO FR-BL
BQ YES See AN
BV Bouvet Island YES NO
CC Cocos (Keeling) Islands YES NO
CK Cook Islands YES NO
CW Curaçao YES NO NL-CW
CX Christmas Island YES NO
FK Falkland Islands (Malvinas) YES NO
FO Faroe Islands YES NO
FX YES deleted http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#FX
GF French Guiana YES NO FR-GF
GG Guernsey YES NO GB-GSY
GI Gibraltar YES NO
GP Guadeloupe YES NO FR-GP
GS South Georgia and the South Sandwich Islands YES NO
GU Guam YES NO US-GU
HK Hong Kong YES NO CN-91
HM Heard Island and Mcdonald Islands YES NO
IM Isle of Man YES NO GB-IOM
IO British Indian Ocean Territory YES NO http://en.wikipedia.org/wiki/ISO_3166-2:IO
JE Jersey YES NO GB-JSY
MF Saint Martin (French Part) YES NO FR-MF
MP Northern Mariana Islands YES NO US-MP
MQ Martinique YES NO FR-MQ
MS Montserrat YES NO
NC New Caledonia YES NO FR-NC
NF Norfolk Island YES NO
NU Niue YES NO
PF French Polynesia YES NO FR-PF
PM Saint Pierre and Miquelon YES NO FR-PM
PS Palestine, State of YES http://en.wikipedia.org/wiki/ISO_3166-2:PS
PN Pitcairn YES NO
PR Puerto Rico YES NO US-PR
RE Réunion YES NO FR-RE
SJ Svalbard and Jan Mayen YES NO NO-21 NO-22 http://en.wikipedia.org/wiki/ISO_3166-2:SJ
SX Sint Maarten (Dutch Part) YES NO NL-SX
TC Turks and Caicos Islands YES NO
TK Tokelau YES NO
TL Timor-Leste YES http://en.wikipedia.org/wiki/ISO_3166-2:TL
TP YES see TL
VA Holy See (Vatican City State) YES NO
VG Virgin Islands, British YES NO
VI Virgin Islands, U.S. YES NO US-VI
WF Wallis and Futuna YES NO FR-WF
YT Mayotte YES NO FR-YT
olahol commented 9 years ago

Thank you Patrick for bringing this to my attention. What do you think should be done? Should I add the list to the README or should I remove the codes from code.csv?

derduher commented 9 years ago

I'm using your library to display states/provinces for each country as a user selects one. I am able to display these two dropdowns with your library alone as the country name is included. The only absent feature are the countries without subdivisions and their codes. So having the data in the library itself that this country does not have any states would be handy.

I would submit this as a PR but I am having trouble finding a legally compatible license. The closest source I've been able to find is http://www.unece.org/cefact/locode/subdivisions.html. Wikipedia is very complete but is under creative commons share alike which seems to be incompatible with the MIT license.