Skip to content

Instantly share code, notes, and snippets.

@snahor
Last active February 28, 2018 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snahor/5122773fa34b13cca92660bbda6d6cf2 to your computer and use it in GitHub Desktop.
Save snahor/5122773fa34b13cca92660bbda6d6cf2 to your computer and use it in GitHub Desktop.
// Array of [continent code, country code, country name]
// Source: https://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_continent_(data_file)
// let rows = Array.from(document.querySelectorAll('table.sortable tr'))
// let data = rows.slice(1).map(row => [row.cells[0].textContent, row.cells[1].textContent, row.cells[4].textContent])
// data
[
[
"AS",
"AF",
"Afghanistan, Islamic Republic of"
],
[
"EU",
"AL",
"Albania, Republic of"
],
[
"AN",
"AQ",
"Antarctica (the territory South of 60 deg S)"
],
[
"AF",
"DZ",
"Algeria, People's Democratic Republic of"
],
[
"OC",
"AS",
"American Samoa"
],
[
"EU",
"AD",
"Andorra, Principality of"
],
[
"AF",
"AO",
"Angola, Republic of"
],
[
"NA",
"AG",
"Antigua and Barbuda"
],
[
"EU",
"AZ",
"Azerbaijan, Republic of"
],
[
"AS",
"AZ",
"Azerbaijan, Republic of"
],
[
"SA",
"AR",
"Argentina, Argentine Republic"
],
[
"OC",
"AU",
"Australia, Commonwealth of"
],
[
"EU",
"AT",
"Austria, Republic of"
],
[
"NA",
"BS",
"Bahamas, Commonwealth of the"
],
[
"AS",
"BH",
"Bahrain, Kingdom of"
],
[
"AS",
"BD",
"Bangladesh, People's Republic of"
],
[
"EU",
"AM",
"Armenia, Republic of"
],
[
"AS",
"AM",
"Armenia, Republic of"
],
[
"NA",
"BB",
"Barbados"
],
[
"EU",
"BE",
"Belgium, Kingdom of"
],
[
"NA",
"BM",
"Bermuda"
],
[
"AS",
"BT",
"Bhutan, Kingdom of"
],
[
"SA",
"BO",
"Bolivia, Republic of"
],
[
"EU",
"BA",
"Bosnia and Herzegovina"
],
[
"AF",
"BW",
"Botswana, Republic of"
],
[
"AN",
"BV",
"Bouvet Island (Bouvetoya)"
],
[
"SA",
"BR",
"Brazil, Federative Republic of"
],
[
"NA",
"BZ",
"Belize"
],
[
"AS",
"IO",
"British Indian Ocean Territory (Chagos Archipelago)"
],
[
"OC",
"SB",
"Solomon Islands"
],
[
"NA",
"VG",
"British Virgin Islands"
],
[
"AS",
"BN",
"Brunei Darussalam"
],
[
"EU",
"BG",
"Bulgaria, Republic of"
],
[
"AS",
"MM",
"Myanmar, Union of"
],
[
"AF",
"BI",
"Burundi, Republic of"
],
[
"EU",
"BY",
"Belarus, Republic of"
],
[
"AS",
"KH",
"Cambodia, Kingdom of"
],
[
"AF",
"CM",
"Cameroon, Republic of"
],
[
"NA",
"CA",
"Canada"
],
[
"AF",
"CV",
"Cape Verde, Republic of"
],
[
"NA",
"KY",
"Cayman Islands"
],
[
"AF",
"CF",
"Central African Republic"
],
[
"AS",
"LK",
"Sri Lanka, Democratic Socialist Republic of"
],
[
"AF",
"TD",
"Chad, Republic of"
],
[
"SA",
"CL",
"Chile, Republic of"
],
[
"AS",
"CN",
"China, People's Republic of"
],
[
"AS",
"TW",
"Taiwan"
],
[
"AS",
"CX",
"Christmas Island"
],
[
"AS",
"CC",
"Cocos (Keeling) Islands"
],
[
"SA",
"CO",
"Colombia, Republic of"
],
[
"AF",
"KM",
"Comoros, Union of the"
],
[
"AF",
"YT",
"Mayotte"
],
[
"AF",
"CG",
"Congo, Republic of the"
],
[
"AF",
"CD",
"Congo, Democratic Republic of the"
],
[
"OC",
"CK",
"Cook Islands"
],
[
"NA",
"CR",
"Costa Rica, Republic of"
],
[
"EU",
"HR",
"Croatia, Republic of"
],
[
"NA",
"CU",
"Cuba, Republic of"
],
[
"EU",
"CY",
"Cyprus, Republic of"
],
[
"AS",
"CY",
"Cyprus, Republic of"
],
[
"EU",
"CZ",
"Czech Republic"
],
[
"AF",
"BJ",
"Benin, Republic of"
],
[
"EU",
"DK",
"Denmark, Kingdom of"
],
[
"NA",
"DM",
"Dominica, Commonwealth of"
],
[
"NA",
"DO",
"Dominican Republic"
],
[
"SA",
"EC",
"Ecuador, Republic of"
],
[
"NA",
"SV",
"El Salvador, Republic of"
],
[
"AF",
"GQ",
"Equatorial Guinea, Republic of"
],
[
"AF",
"ET",
"Ethiopia, Federal Democratic Republic of"
],
[
"AF",
"ER",
"Eritrea, State of"
],
[
"EU",
"EE",
"Estonia, Republic of"
],
[
"EU",
"FO",
"Faroe Islands"
],
[
"SA",
"FK",
"Falkland Islands (Malvinas)"
],
[
"AN",
"GS",
"South Georgia and the South Sandwich Islands"
],
[
"OC",
"FJ",
"Fiji, Republic of the Fiji Islands"
],
[
"EU",
"FI",
"Finland, Republic of"
],
[
"EU",
"AX",
"Åland Islands"
],
[
"EU",
"FR",
"France, French Republic"
],
[
"SA",
"GF",
"French Guiana"
],
[
"OC",
"PF",
"French Polynesia"
],
[
"AN",
"TF",
"French Southern Territories"
],
[
"AF",
"DJ",
"Djibouti, Republic of"
],
[
"AF",
"GA",
"Gabon, Gabonese Republic"
],
[
"EU",
"GE",
"Georgia"
],
[
"AS",
"GE",
"Georgia"
],
[
"AF",
"GM",
"Gambia, Republic of the"
],
[
"AS",
"PS",
"Palestinian Territory, Occupied"
],
[
"EU",
"DE",
"Germany, Federal Republic of"
],
[
"AF",
"GH",
"Ghana, Republic of"
],
[
"EU",
"GI",
"Gibraltar"
],
[
"OC",
"KI",
"Kiribati, Republic of"
],
[
"EU",
"GR",
"Greece, Hellenic Republic"
],
[
"NA",
"GL",
"Greenland"
],
[
"NA",
"GD",
"Grenada"
],
[
"NA",
"GP",
"Guadeloupe"
],
[
"OC",
"GU",
"Guam"
],
[
"NA",
"GT",
"Guatemala, Republic of"
],
[
"AF",
"GN",
"Guinea, Republic of"
],
[
"SA",
"GY",
"Guyana, Co-operative Republic of"
],
[
"NA",
"HT",
"Haiti, Republic of"
],
[
"AN",
"HM",
"Heard Island and McDonald Islands"
],
[
"EU",
"VA",
"Holy See (Vatican City State)"
],
[
"NA",
"HN",
"Honduras, Republic of"
],
[
"AS",
"HK",
"Hong Kong, Special Administrative Region of China"
],
[
"EU",
"HU",
"Hungary, Republic of"
],
[
"EU",
"IS",
"Iceland, Republic of"
],
[
"AS",
"IN",
"India, Republic of"
],
[
"AS",
"ID",
"Indonesia, Republic of"
],
[
"AS",
"IR",
"Iran, Islamic Republic of"
],
[
"AS",
"IQ",
"Iraq, Republic of"
],
[
"EU",
"IE",
"Ireland"
],
[
"AS",
"IL",
"Israel, State of"
],
[
"EU",
"IT",
"Italy, Italian Republic"
],
[
"AF",
"CI",
"Cote d'Ivoire, Republic of"
],
[
"NA",
"JM",
"Jamaica"
],
[
"AS",
"JP",
"Japan"
],
[
"EU",
"KZ",
"Kazakhstan, Republic of"
],
[
"AS",
"KZ",
"Kazakhstan, Republic of"
],
[
"AS",
"JO",
"Jordan, Hashemite Kingdom of"
],
[
"AF",
"KE",
"Kenya, Republic of"
],
[
"AS",
"KP",
"Korea, Democratic People's Republic of"
],
[
"AS",
"KR",
"Korea, Republic of"
],
[
"AS",
"KW",
"Kuwait, State of"
],
[
"AS",
"KG",
"Kyrgyz Republic"
],
[
"AS",
"LA",
"Lao People's Democratic Republic"
],
[
"AS",
"LB",
"Lebanon, Lebanese Republic"
],
[
"AF",
"LS",
"Lesotho, Kingdom of"
],
[
"EU",
"LV",
"Latvia, Republic of"
],
[
"AF",
"LR",
"Liberia, Republic of"
],
[
"AF",
"LY",
"Libyan Arab Jamahiriya"
],
[
"EU",
"LI",
"Liechtenstein, Principality of"
],
[
"EU",
"LT",
"Lithuania, Republic of"
],
[
"EU",
"LU",
"Luxembourg, Grand Duchy of"
],
[
"AS",
"MO",
"Macao, Special Administrative Region of China"
],
[
"AF",
"MG",
"Madagascar, Republic of"
],
[
"AF",
"MW",
"Malawi, Republic of"
],
[
"AS",
"MY",
"Malaysia"
],
[
"AS",
"MV",
"Maldives, Republic of"
],
[
"AF",
"ML",
"Mali, Republic of"
],
[
"EU",
"MT",
"Malta, Republic of"
],
[
"NA",
"MQ",
"Martinique"
],
[
"AF",
"MR",
"Mauritania, Islamic Republic of"
],
[
"AF",
"MU",
"Mauritius, Republic of"
],
[
"NA",
"MX",
"Mexico, United Mexican States"
],
[
"EU",
"MC",
"Monaco, Principality of"
],
[
"AS",
"MN",
"Mongolia"
],
[
"EU",
"MD",
"Moldova, Republic of"
],
[
"EU",
"ME",
"Montenegro, Republic of"
],
[
"NA",
"MS",
"Montserrat"
],
[
"AF",
"MA",
"Morocco, Kingdom of"
],
[
"AF",
"MZ",
"Mozambique, Republic of"
],
[
"AS",
"OM",
"Oman, Sultanate of"
],
[
"AF",
"NA",
"Namibia, Republic of"
],
[
"OC",
"NR",
"Nauru, Republic of"
],
[
"AS",
"NP",
"Nepal, State of"
],
[
"EU",
"NL",
"Netherlands, Kingdom of the"
],
[
"NA",
"AN",
"Netherlands Antilles"
],
[
"NA",
"CW",
"Curaçao"
],
[
"NA",
"AW",
"Aruba"
],
[
"NA",
"SX",
"Sint Maarten (Netherlands)"
],
[
"NA",
"BQ",
"Bonaire, Sint Eustatius and Saba"
],
[
"OC",
"NC",
"New Caledonia"
],
[
"OC",
"VU",
"Vanuatu, Republic of"
],
[
"OC",
"NZ",
"New Zealand"
],
[
"NA",
"NI",
"Nicaragua, Republic of"
],
[
"AF",
"NE",
"Niger, Republic of"
],
[
"AF",
"NG",
"Nigeria, Federal Republic of"
],
[
"OC",
"NU",
"Niue"
],
[
"OC",
"NF",
"Norfolk Island"
],
[
"EU",
"NO",
"Norway, Kingdom of"
],
[
"OC",
"MP",
"Northern Mariana Islands, Commonwealth of the"
],
[
"OC",
"UM",
"United States Minor Outlying Islands"
],
[
"NA",
"UM",
"United States Minor Outlying Islands"
],
[
"OC",
"FM",
"Micronesia, Federated States of"
],
[
"OC",
"MH",
"Marshall Islands, Republic of the"
],
[
"OC",
"PW",
"Palau, Republic of"
],
[
"AS",
"PK",
"Pakistan, Islamic Republic of"
],
[
"NA",
"PA",
"Panama, Republic of"
],
[
"OC",
"PG",
"Papua New Guinea, Independent State of"
],
[
"SA",
"PY",
"Paraguay, Republic of"
],
[
"SA",
"PE",
"Peru, Republic of"
],
[
"AS",
"PH",
"Philippines, Republic of the"
],
[
"OC",
"PN",
"Pitcairn Islands"
],
[
"EU",
"PL",
"Poland, Republic of"
],
[
"EU",
"PT",
"Portugal, Portuguese Republic"
],
[
"AF",
"GW",
"Guinea-Bissau, Republic of"
],
[
"AS",
"TL",
"Timor-Leste, Democratic Republic of"
],
[
"NA",
"PR",
"Puerto Rico, Commonwealth of"
],
[
"AS",
"QA",
"Qatar, State of"
],
[
"AF",
"RE",
"Reunion"
],
[
"EU",
"RO",
"Romania"
],
[
"EU",
"RU",
"Russian Federation"
],
[
"AS",
"RU",
"Russian Federation"
],
[
"AF",
"RW",
"Rwanda, Republic of"
],
[
"NA",
"BL",
"Saint Barthelemy"
],
[
"AF",
"SH",
"Saint Helena"
],
[
"NA",
"KN",
"Saint Kitts and Nevis, Federation of"
],
[
"NA",
"AI",
"Anguilla"
],
[
"NA",
"LC",
"Saint Lucia"
],
[
"NA",
"MF",
"Saint Martin"
],
[
"NA",
"PM",
"Saint Pierre and Miquelon"
],
[
"NA",
"VC",
"Saint Vincent and the Grenadines"
],
[
"EU",
"SM",
"San Marino, Republic of"
],
[
"AF",
"ST",
"Sao Tome and Principe, Democratic Republic of"
],
[
"AS",
"SA",
"Saudi Arabia, Kingdom of"
],
[
"AF",
"SN",
"Senegal, Republic of"
],
[
"EU",
"RS",
"Serbia, Republic of"
],
[
"AF",
"SC",
"Seychelles, Republic of"
],
[
"AF",
"SL",
"Sierra Leone, Republic of"
],
[
"AS",
"SG",
"Singapore, Republic of"
],
[
"EU",
"SK",
"Slovakia (Slovak Republic)"
],
[
"AS",
"VN",
"Vietnam, Socialist Republic of"
],
[
"EU",
"SI",
"Slovenia, Republic of"
],
[
"AF",
"SO",
"Somalia, Somali Republic"
],
[
"AF",
"ZA",
"South Africa, Republic of"
],
[
"AF",
"ZW",
"Zimbabwe, Republic of"
],
[
"EU",
"ES",
"Spain, Kingdom of"
],
[
"AF",
"SS",
"South Sudan"
],
[
"AF",
"EH",
"Western Sahara"
],
[
"AF",
"SD",
"Sudan, Republic of"
],
[
"SA",
"SR",
"Suriname, Republic of"
],
[
"EU",
"SJ",
"Svalbard & Jan Mayen Islands"
],
[
"AF",
"SZ",
"Swaziland, Kingdom of"
],
[
"EU",
"SE",
"Sweden, Kingdom of"
],
[
"EU",
"CH",
"Switzerland, Swiss Confederation"
],
[
"AS",
"SY",
"Syrian Arab Republic"
],
[
"AS",
"TJ",
"Tajikistan, Republic of"
],
[
"AS",
"TH",
"Thailand, Kingdom of"
],
[
"AF",
"TG",
"Togo, Togolese Republic"
],
[
"OC",
"TK",
"Tokelau"
],
[
"OC",
"TO",
"Tonga, Kingdom of"
],
[
"NA",
"TT",
"Trinidad and Tobago, Republic of"
],
[
"AS",
"AE",
"United Arab Emirates"
],
[
"AF",
"TN",
"Tunisia, Tunisian Republic"
],
[
"EU",
"TR",
"Turkey, Republic of"
],
[
"AS",
"TR",
"Turkey, Republic of"
],
[
"AS",
"TM",
"Turkmenistan"
],
[
"NA",
"TC",
"Turks and Caicos Islands"
],
[
"OC",
"TV",
"Tuvalu"
],
[
"AF",
"UG",
"Uganda, Republic of"
],
[
"EU",
"UA",
"Ukraine"
],
[
"EU",
"MK",
"Macedonia, The Former Yugoslav Republic of"
],
[
"AF",
"EG",
"Egypt, Arab Republic of"
],
[
"EU",
"GB",
"United Kingdom of Great Britain & Northern Ireland"
],
[
"EU",
"GG",
"Guernsey, Bailiwick of"
],
[
"EU",
"JE",
"Jersey, Bailiwick of"
],
[
"EU",
"IM",
"Isle of Man"
],
[
"AF",
"TZ",
"Tanzania, United Republic of"
],
[
"NA",
"US",
"United States of America"
],
[
"NA",
"VI",
"United States Virgin Islands"
],
[
"AF",
"BF",
"Burkina Faso"
],
[
"SA",
"UY",
"Uruguay, Eastern Republic of"
],
[
"AS",
"UZ",
"Uzbekistan, Republic of"
],
[
"SA",
"VE",
"Venezuela, Bolivarian Republic of"
],
[
"OC",
"WF",
"Wallis and Futuna"
],
[
"OC",
"WS",
"Samoa, Independent State of"
],
[
"AS",
"YE",
"Yemen"
],
[
"AF",
"ZM",
"Zambia, Republic of"
],
[
"OC",
"XX",
"Disputed Territory"
],
[
"AS",
"XE",
"Iraq-Saudi Arabia Neutral Zone"
],
[
"AS",
"XD",
"United Nations Neutral Zone"
],
[
"AS",
"XS",
"Spratly Islands"
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment