Skip to content

Instantly share code, notes, and snippets.

@richjenks
Last active October 24, 2024 15:47
Show Gist options
  • Save richjenks/15b75f1960bc3321e295 to your computer and use it in GitHub Desktop.
Save richjenks/15b75f1960bc3321e295 to your computer and use it in GitHub Desktop.
ISO 3166 countries by region — AMER, EMEA & APAC
Country ISO 3166 Region
Afghanistan AF EMEA
Åland Islands AX EMEA
Albania AL EMEA
Algeria DZ EMEA
American Samoa AS APAC
Andorra AD EMEA
Angola AO EMEA
Anguilla AI AMER
Antarctica AQ APAC
Antigua and Barbuda AG AMER
Argentina AR AMER
Armenia AM EMEA
Aruba AW AMER
Australia AU APAC
Austria AT EMEA
Azerbaijan AZ EMEA
Bahamas BS AMER
Bahrain BH EMEA
Bangladesh BD APAC
Barbados BB AMER
Belarus BY EMEA
Belgium BE EMEA
Belize BZ AMER
Benin BJ EMEA
Bermuda BM AMER
Bhutan BT APAC
Bolivia (Plurinational State of) BO AMER
Bonaire, Sint Eustatius and Saba BQ AMER
Bosnia and Herzegovina BA EMEA
Botswana BW EMEA
Bouvet Island BV EMEA
Brazil BR AMER
British Indian Ocean Territory IO APAC
Brunei Darussalam BN APAC
Bulgaria BG EMEA
Burkina Faso BF EMEA
Burundi BI EMEA
Cambodia KH APAC
Cameroon CM EMEA
Canada CA AMER
Cabo Verde CV EMEA
Cayman Islands KY AMER
Central African Republic CF EMEA
Chad TD EMEA
Chile CL AMER
China CN APAC
Christmas Island CX APAC
Cocos (Keeling) Islands CC APAC
Colombia CO AMER
Comoros KM EMEA
Congo (Democratic Republic of the) CD EMEA
Congo CG EMEA
Cook Islands CK APAC
Costa Rica CR AMER
Côte d’Ivoire CI EMEA
Croatia HR EMEA
Cuba CU AMER
Curaçao CW AMER
Cyprus CY EMEA
Czech Republic CZ EMEA
Denmark DK EMEA
Djibouti DJ EMEA
Dominica DM AMER
Dominican Republic DO AMER
Ecuador EC AMER
Egypt EG EMEA
El Salvador SV AMER
Equatorial Guinea GQ EMEA
Eritrea ER EMEA
Estonia EE EMEA
Ethiopia ET EMEA
Falkland Islands FK EMEA
Faroe Islands FO EMEA
Fiji FJ APAC
Finland FI EMEA
France FR EMEA
French Guiana GF AMER
French Polynesia PF APAC
French Southern Territories TF APAC
Gabon GA EMEA
Gambia GM EMEA
Georgia GE EMEA
Germany DE EMEA
Ghana GH EMEA
Gibraltar GI EMEA
Greece GR EMEA
Greenland GL EMEA
Grenada GD AMER
Guadeloupe GP AMER
Guam GU APAC
Guatemala GT AMER
Guernsey GG EMEA
Guinea GN EMEA
Guinea-Bissau GW EMEA
Guyana GY AMER
Haiti HT AMER
Heard Island and McDonald Islands HM APAC
Vatican City VA EMEA
Honduras HN AMER
Hong Kong HK APAC
Hungary HU EMEA
Iceland IS EMEA
India IN APAC
Indonesia ID APAC
Iran IR EMEA
Iraq IQ EMEA
Ireland IE EMEA
Isle of Man IM EMEA
Israel IL EMEA
Italy IT EMEA
Jamaica JM AMER
Japan JP APAC
Jersey JE EMEA
Jordan JO EMEA
Kazakhstan KZ EMEA
Kenya KE EMEA
Kiribati KI APAC
Korea (Democratic People’s Republic of) KV APAC
Korea (Republic of) KR APAC
Kuwait KW EMEA
Kyrgyzstan KG APAC
Laos LA APAC
Latvia LV EMEA
Lebanon LB EMEA
Lesotho LS EMEA
Liberia LR EMEA
Libya LY EMEA
Liechtenstein LI EMEA
Lithuania LT EMEA
Luxembourg LU EMEA
Macao MO APAC
Macedonia MK EMEA
Madagascar MG EMEA
Malawi MW EMEA
Malaysia MY APAC
Maldives MV APAC
Mali ML EMEA
Malta MT EMEA
Marshall Islands MH APAC
Martinique MQ AMER
Mauritania MR EMEA
Mauritius MU EMEA
Mayotte YT EMEA
Mexico MX AMER
Micronesia FM APAC
Moldova MD EMEA
Monaco MC EMEA
Mongolia MN APAC
Montenegro ME EMEA
Montserrat MS AMER
Morocco MA EMEA
Mozambique MZ EMEA
Myanmar MM APAC
Namibia NA EMEA
Nauru NR APAC
Nepal NP APAC
Netherlands NL EMEA
New Caledonia NC APAC
New Zealand NZ APAC
Nicaragua NI AMER
Niger NE EMEA
Nigeria NG EMEA
Niue NU APAC
Norfolk Island NF APAC
Northern Mariana Islands MP APAC
Norway NO EMEA
Oman OM EMEA
Pakistan PK APAC
Palau PW APAC
Palestine PS EMEA
Panama PA AMER
Papua New Guinea PG APAC
Paraguay PY AMER
Peru PE AMER
Philippines PH APAC
Pitcairn PN APAC
Poland PL EMEA
Portugal PT EMEA
Puerto Rico PR AMER
Qatar QA EMEA
Réunion RE EMEA
Romania RO EMEA
Russia RU EMEA
Rwanda RW EMEA
Saint Barthélemy BL AMER
Saint Helena SH EMEA
Saint Kitts And Nevis KN AMER
Saint Lucia LC AMER
Saint Martin MF AMER
Saint Pierre and Miquelon PM AMER
Saint Vincent and The Grenadines VC AMER
Samoa WS APAC
San Marino SM EMEA
Sao Tome and Principe ST EMEA
Saudi Arabia SA EMEA
Senegal SN EMEA
Serbia RS EMEA
Seychelles SC EMEA
Sierra Leone SL EMEA
Singapore SG APAC
Sint Maarten (Dutch part) SX AMER
Slovakia SK EMEA
Slovenia SI EMEA
Solomon Islands SB APAC
Somalia SO EMEA
South Africa ZA EMEA
South Georgia and the South Sandwich Islands GS EMEA
South Sudan SS EMEA
Spain ES EMEA
Sri Lanka LK APAC
Sudan SD EMEA
Suriname SR AMER
Svalbard SJ EMEA
Swaziland SZ EMEA
Sweden SE EMEA
Switzerland CH EMEA
Syria SY EMEA
Taiwan TW APAC
Tajikistan TJ APAC
Tanzania TZ EMEA
Thailand TH APAC
Timor-Leste TL APAC
Togo TG EMEA
Tokelau TK APAC
Tonga TO APAC
Trinidad and Tobago TT AMER
Tunisia TN EMEA
Turkey TR EMEA
Turkmenistan TM APAC
Turks and Caicos Islands TC AMER
Tuvalu TV APAC
Uganda UG EMEA
Ukraine UA EMEA
United Arab Emirates AE EMEA
United Kingdom GB EMEA
United States Minor Outlying Islands UM APAC
United States of America US AMER
Uruguay UY AMER
Uzbekistan UZ APAC
Vanuatu VU APAC
Venezuela VE AMER
Viet Nam VN APAC
Virgin Islands (British) VG AMER
Virgin Islands (U.S.) VI AMER
Wallis and Futuna WF APAC
Western Sahara EH EMEA
Yemen YE EMEA
Zambia ZM EMEA
Zimbabwe ZW EMEA
@srdanz
Copy link

srdanz commented Jan 6, 2017

Thank you! could you please fix the designation for two Koreas - I believe that they belong to APAC region, and not EMEA.

@evanlouie
Copy link

Couple of functions to convert the table to JS objects if you need to consume

const regionToCountriesMap = () => {
    return Array.from(document.querySelectorAll('tr')).filter((tr) => {
        return Array.from(tr.children).length === 3;
    }).reduce((carry, tr) => {
        const tds = tr.children;
        const countryName = tds[0].innerText;
        const countryCode = tds[1].innerText;
        const regionCode = tds[2].innerText;

        if (!Array.isArray(carry[regionCode])) {
            carry[regionCode] = [];
        }
        carry[regionCode].push([countryName, countryCode]);
        return carry;
    }, {});
};

const countryCodeToRegionMap = () => {
    return Array.from(document.querySelectorAll('tr')).filter((tr) => {
        return Array.from(tr.children).length === 3;
    }).reduce((carry, tr) => {
        const tds = tr.children;
        const countryName = tds[0].innerText;
        const countryCode = tds[1].innerText;
        const regionCode = tds[2].innerText;

        carry[countryCode] = regionCode;
        return carry;
    }, {});
};

@icnocop
Copy link

icnocop commented Feb 4, 2017

Along with the errors in the two Korea entries as @srdanz mentioned, "South Sudan" should be EMEA, not APAC.

Thank you!

@k3coco
Copy link

k3coco commented May 1, 2017

Thank you for the list! I needed to add CS for the Canary Islands, and ZJ for Saint Helier, both EMEA

@icnocop
Copy link

icnocop commented Feb 16, 2018

@lagoasoft-lucasschmidt
Copy link

lagoasoft-lucasschmidt commented Jun 30, 2020

Thank you guys ... gods!!!

Using the function from @evanlouie

const json = regionToCountriesMap();
JSON.stringify(json.APAC.map((arr) => ({name: arr[0], id: arr[1]})))

amer.json

[
  {
    "name":"Anguilla",
    "id":"AI"
  },
  {
    "name":"Antigua and Barbuda",
    "id":"AG"
  },
  {
    "name":"Argentina",
    "id":"AR"
  },
  {
    "name":"Aruba",
    "id":"AW"
  },
  {
    "name":"Bahamas",
    "id":"BS"
  },
  {
    "name":"Barbados",
    "id":"BB"
  },
  {
    "name":"Belize",
    "id":"BZ"
  },
  {
    "name":"Bermuda",
    "id":"BM"
  },
  {
    "name":"Bolivia (Plurinational State of)",
    "id":"BO"
  },
  {
    "name":"Bonaire, Sint Eustatius and Saba",
    "id":"BQ"
  },
  {
    "name":"Brazil",
    "id":"BR"
  },
  {
    "name":"Canada",
    "id":"CA"
  },
  {
    "name":"Cayman Islands",
    "id":"KY"
  },
  {
    "name":"Chile",
    "id":"CL"
  },
  {
    "name":"Colombia",
    "id":"CO"
  },
  {
    "name":"Costa Rica",
    "id":"CR"
  },
  {
    "name":"Cuba",
    "id":"CU"
  },
  {
    "name":"Curaçao",
    "id":"CW"
  },
  {
    "name":"Dominica",
    "id":"DM"
  },
  {
    "name":"Dominican Republic",
    "id":"DO"
  },
  {
    "name":"Ecuador",
    "id":"EC"
  },
  {
    "name":"El Salvador",
    "id":"SV"
  },
  {
    "name":"French Guiana",
    "id":"GF"
  },
  {
    "name":"Grenada",
    "id":"GD"
  },
  {
    "name":"Guadeloupe",
    "id":"GP"
  },
  {
    "name":"Guatemala",
    "id":"GT"
  },
  {
    "name":"Guyana",
    "id":"GY"
  },
  {
    "name":"Haiti",
    "id":"HT"
  },
  {
    "name":"Honduras",
    "id":"HN"
  },
  {
    "name":"Jamaica",
    "id":"JM"
  },
  {
    "name":"Martinique",
    "id":"MQ"
  },
  {
    "name":"Mexico",
    "id":"MX"
  },
  {
    "name":"Montserrat",
    "id":"MS"
  },
  {
    "name":"Nicaragua",
    "id":"NI"
  },
  {
    "name":"Panama",
    "id":"PA"
  },
  {
    "name":"Paraguay",
    "id":"PY"
  },
  {
    "name":"Peru",
    "id":"PE"
  },
  {
    "name":"Puerto Rico",
    "id":"PR"
  },
  {
    "name":"Saint Barthélemy",
    "id":"BL"
  },
  {
    "name":"Saint Kitts And Nevis",
    "id":"KN"
  },
  {
    "name":"Saint Lucia",
    "id":"LC"
  },
  {
    "name":"Saint Martin",
    "id":"MF"
  },
  {
    "name":"Saint Pierre and Miquelon",
    "id":"PM"
  },
  {
    "name":"Saint Vincent and The Grenadines",
    "id":"VC"
  },
  {
    "name":"Sint Maarten (Dutch part)",
    "id":"SX"
  },
  {
    "name":"Suriname",
    "id":"SR"
  },
  {
    "name":"Trinidad and Tobago",
    "id":"TT"
  },
  {
    "name":"Turks and Caicos Islands",
    "id":"TC"
  },
  {
    "name":"United States",
    "id":"US"
  },
  {
    "name":"Uruguay",
    "id":"UY"
  },
  {
    "name":"Venezuela",
    "id":"VE"
  },
  {
    "name":"Virgin Islands (British)",
    "id":"VG"
  },
  {
    "name":"Virgin Islands (U.S.)",
    "id":"VI"
  }
]

apac.json

[
  {
    "name":"American Samoa",
    "id":"AS"
  },
  {
    "name":"Antarctica",
    "id":"AQ"
  },
  {
    "name":"Australia",
    "id":"AU"
  },
  {
    "name":"Bangladesh",
    "id":"BD"
  },
  {
    "name":"Bhutan",
    "id":"BT"
  },
  {
    "name":"British Indian Ocean Territory",
    "id":"IO"
  },
  {
    "name":"Brunei Darussalam",
    "id":"BN"
  },
  {
    "name":"Cambodia",
    "id":"KH"
  },
  {
    "name":"China",
    "id":"CN"
  },
  {
    "name":"Christmas Island",
    "id":"CX"
  },
  {
    "name":"Cocos (Keeling) Islands",
    "id":"CC"
  },
  {
    "name":"Cook Islands",
    "id":"CK"
  },
  {
    "name":"Fiji",
    "id":"FJ"
  },
  {
    "name":"French Polynesia",
    "id":"PF"
  },
  {
    "name":"French Southern Territories",
    "id":"TF"
  },
  {
    "name":"Guam",
    "id":"GU"
  },
  {
    "name":"Heard Island and McDonald Islands",
    "id":"HM"
  },
  {
    "name":"Hong Kong",
    "id":"HK"
  },
  {
    "name":"India",
    "id":"IN"
  },
  {
    "name":"Indonesia",
    "id":"ID"
  },
  {
    "name":"Japan",
    "id":"JP"
  },
  {
    "name":"Kiribati",
    "id":"KI"
  },
  {
    "name":"Kyrgyzstan",
    "id":"KG"
  },
  {
    "name":"Laos",
    "id":"LA"
  },
  {
    "name":"Macao",
    "id":"MO"
  },
  {
    "name":"Malaysia",
    "id":"MY"
  },
  {
    "name":"Maldives",
    "id":"MV"
  },
  {
    "name":"Marshall Islands",
    "id":"MH"
  },
  {
    "name":"Micronesia",
    "id":"FM"
  },
  {
    "name":"Mongolia",
    "id":"MN"
  },
  {
    "name":"Myanmar",
    "id":"MM"
  },
  {
    "name":"Nauru",
    "id":"NR"
  },
  {
    "name":"Nepal",
    "id":"NP"
  },
  {
    "name":"New Caledonia",
    "id":"NC"
  },
  {
    "name":"New Zealand",
    "id":"NZ"
  },
  {
    "name":"Niue",
    "id":"NU"
  },
  {
    "name":"Norfolk Island",
    "id":"NF"
  },
  {
    "name":"Northern Mariana Islands",
    "id":"MP"
  },
  {
    "name":"Pakistan",
    "id":"PK"
  },
  {
    "name":"Palau",
    "id":"PW"
  },
  {
    "name":"Papua New Guinea",
    "id":"PG"
  },
  {
    "name":"Philippines",
    "id":"PH"
  },
  {
    "name":"Pitcairn",
    "id":"PN"
  },
  {
    "name":"Samoa",
    "id":"WS"
  },
  {
    "name":"Singapore",
    "id":"SG"
  },
  {
    "name":"Solomon Islands",
    "id":"SB"
  },
  {
    "name":"South Sudan",
    "id":"SS"
  },
  {
    "name":"Sri Lanka",
    "id":"LK"
  },
  {
    "name":"Taiwan",
    "id":"TW"
  },
  {
    "name":"Tajikistan",
    "id":"TJ"
  },
  {
    "name":"Thailand",
    "id":"TH"
  },
  {
    "name":"Timor-Leste",
    "id":"TL"
  },
  {
    "name":"Tokelau",
    "id":"TK"
  },
  {
    "name":"Tonga",
    "id":"TO"
  },
  {
    "name":"Turkmenistan",
    "id":"TM"
  },
  {
    "name":"Tuvalu",
    "id":"TV"
  },
  {
    "name":"United States Minor Outlying Islands",
    "id":"UM"
  },
  {
    "name":"Uzbekistan",
    "id":"UZ"
  },
  {
    "name":"Vanuatu",
    "id":"VU"
  },
  {
    "name":"Viet Nam",
    "id":"VN"
  },
  {
    "name":"Wallis and Futuna",
    "id":"WF"
  }
]

emea.json

[
  {
    "name":"Afghanistan",
    "id":"AF"
  },
  {
    "name":"Åland Islands",
    "id":"AX"
  },
  {
    "name":"Albania",
    "id":"AL"
  },
  {
    "name":"Algeria",
    "id":"DZ"
  },
  {
    "name":"Andorra",
    "id":"AD"
  },
  {
    "name":"Angola",
    "id":"AO"
  },
  {
    "name":"Armenia",
    "id":"AM"
  },
  {
    "name":"Austria",
    "id":"AT"
  },
  {
    "name":"Azerbaijan",
    "id":"AZ"
  },
  {
    "name":"Bahrain",
    "id":"BH"
  },
  {
    "name":"Belarus",
    "id":"BY"
  },
  {
    "name":"Belgium",
    "id":"BE"
  },
  {
    "name":"Benin",
    "id":"BJ"
  },
  {
    "name":"Bosnia and Herzegovina",
    "id":"BA"
  },
  {
    "name":"Botswana",
    "id":"BW"
  },
  {
    "name":"Bouvet Island",
    "id":"BV"
  },
  {
    "name":"Bulgaria",
    "id":"BG"
  },
  {
    "name":"Burkina Faso",
    "id":"BF"
  },
  {
    "name":"Burundi",
    "id":"BI"
  },
  {
    "name":"Cameroon",
    "id":"CM"
  },
  {
    "name":"Cabo Verde",
    "id":"CV"
  },
  {
    "name":"Central African Republic",
    "id":"CF"
  },
  {
    "name":"Chad",
    "id":"TD"
  },
  {
    "name":"Comoros",
    "id":"KM"
  },
  {
    "name":"Congo (Democratic Republic of the)",
    "id":"CD"
  },
  {
    "name":"Congo",
    "id":"CG"
  },
  {
    "name":"Côte d’Ivoire",
    "id":"CI"
  },
  {
    "name":"Croatia",
    "id":"HR"
  },
  {
    "name":"Cyprus",
    "id":"CY"
  },
  {
    "name":"Czech Republic",
    "id":"CZ"
  },
  {
    "name":"Denmark",
    "id":"DK"
  },
  {
    "name":"Djibouti",
    "id":"DJ"
  },
  {
    "name":"Egypt",
    "id":"EG"
  },
  {
    "name":"Equatorial Guinea",
    "id":"GQ"
  },
  {
    "name":"Eritrea",
    "id":"ER"
  },
  {
    "name":"Estonia",
    "id":"EE"
  },
  {
    "name":"Ethiopia",
    "id":"ET"
  },
  {
    "name":"Falkland Islands",
    "id":"FK"
  },
  {
    "name":"Faroe Islands",
    "id":"FO"
  },
  {
    "name":"Finland",
    "id":"FI"
  },
  {
    "name":"France",
    "id":"FR"
  },
  {
    "name":"Gabon",
    "id":"GA"
  },
  {
    "name":"Gambia",
    "id":"GM"
  },
  {
    "name":"Georgia",
    "id":"GE"
  },
  {
    "name":"Germany",
    "id":"DE"
  },
  {
    "name":"Ghana",
    "id":"GH"
  },
  {
    "name":"Gibraltar",
    "id":"GI"
  },
  {
    "name":"Greece",
    "id":"GR"
  },
  {
    "name":"Greenland",
    "id":"GL"
  },
  {
    "name":"Guernsey",
    "id":"GG"
  },
  {
    "name":"Guinea",
    "id":"GN"
  },
  {
    "name":"Guinea-Bissau",
    "id":"GW"
  },
  {
    "name":"Vatican City",
    "id":"VA"
  },
  {
    "name":"Hungary",
    "id":"HU"
  },
  {
    "name":"Iceland",
    "id":"IS"
  },
  {
    "name":"Iran",
    "id":"IR"
  },
  {
    "name":"Iraq",
    "id":"IQ"
  },
  {
    "name":"Ireland",
    "id":"IE"
  },
  {
    "name":"Isle of Man",
    "id":"IM"
  },
  {
    "name":"Israel",
    "id":"IL"
  },
  {
    "name":"Italy",
    "id":"IT"
  },
  {
    "name":"Jersey",
    "id":"JE"
  },
  {
    "name":"Jordan",
    "id":"JO"
  },
  {
    "name":"Kazakhstan",
    "id":"KZ"
  },
  {
    "name":"Kenya",
    "id":"KE"
  },
  {
    "name":"Korea (Democratic People’s Republic of)",
    "id":"KV"
  },
  {
    "name":"Korea (Republic of)",
    "id":"KR"
  },
  {
    "name":"Kuwait",
    "id":"KW"
  },
  {
    "name":"Latvia",
    "id":"LV"
  },
  {
    "name":"Lebanon",
    "id":"LB"
  },
  {
    "name":"Lesotho",
    "id":"LS"
  },
  {
    "name":"Liberia",
    "id":"LR"
  },
  {
    "name":"Libya",
    "id":"LY"
  },
  {
    "name":"Liechtenstein",
    "id":"LI"
  },
  {
    "name":"Lithuania",
    "id":"LT"
  },
  {
    "name":"Luxembourg",
    "id":"LU"
  },
  {
    "name":"Macedonia",
    "id":"MK"
  },
  {
    "name":"Madagascar",
    "id":"MG"
  },
  {
    "name":"Malawi",
    "id":"MW"
  },
  {
    "name":"Mali",
    "id":"ML"
  },
  {
    "name":"Malta",
    "id":"MT"
  },
  {
    "name":"Mauritania",
    "id":"MR"
  },
  {
    "name":"Mauritius",
    "id":"MU"
  },
  {
    "name":"Mayotte",
    "id":"YT"
  },
  {
    "name":"Moldova",
    "id":"MD"
  },
  {
    "name":"Monaco",
    "id":"MC"
  },
  {
    "name":"Montenegro",
    "id":"ME"
  },
  {
    "name":"Morocco",
    "id":"MA"
  },
  {
    "name":"Mozambique",
    "id":"MZ"
  },
  {
    "name":"Namibia",
    "id":"NA"
  },
  {
    "name":"Netherlands",
    "id":"NL"
  },
  {
    "name":"Niger",
    "id":"NE"
  },
  {
    "name":"Nigeria",
    "id":"NG"
  },
  {
    "name":"Norway",
    "id":"NO"
  },
  {
    "name":"Oman",
    "id":"OM"
  },
  {
    "name":"Palestine",
    "id":"PS"
  },
  {
    "name":"Poland",
    "id":"PL"
  },
  {
    "name":"Portugal",
    "id":"PT"
  },
  {
    "name":"Qatar",
    "id":"QA"
  },
  {
    "name":"Réunion",
    "id":"RE"
  },
  {
    "name":"Romania",
    "id":"RO"
  },
  {
    "name":"Russia",
    "id":"RU"
  },
  {
    "name":"Rwanda",
    "id":"RW"
  },
  {
    "name":"Saint Helena",
    "id":"SH"
  },
  {
    "name":"San Marino",
    "id":"SM"
  },
  {
    "name":"Sao Tome and Principe",
    "id":"ST"
  },
  {
    "name":"Saudi Arabia",
    "id":"SA"
  },
  {
    "name":"Senegal",
    "id":"SN"
  },
  {
    "name":"Serbia",
    "id":"RS"
  },
  {
    "name":"Seychelles",
    "id":"SC"
  },
  {
    "name":"Sierra Leone",
    "id":"SL"
  },
  {
    "name":"Slovakia",
    "id":"SK"
  },
  {
    "name":"Slovenia",
    "id":"SI"
  },
  {
    "name":"Somalia",
    "id":"SO"
  },
  {
    "name":"South Africa",
    "id":"ZA"
  },
  {
    "name":"South Georgia and the South Sandwich Islands",
    "id":"GS"
  },
  {
    "name":"Spain",
    "id":"ES"
  },
  {
    "name":"Sudan",
    "id":"SD"
  },
  {
    "name":"Svalbard",
    "id":"SJ"
  },
  {
    "name":"Swaziland",
    "id":"SZ"
  },
  {
    "name":"Sweden",
    "id":"SE"
  },
  {
    "name":"Switzerland",
    "id":"CH"
  },
  {
    "name":"Syria",
    "id":"SY"
  },
  {
    "name":"Tanzania",
    "id":"TZ"
  },
  {
    "name":"Togo",
    "id":"TG"
  },
  {
    "name":"Tunisia",
    "id":"TN"
  },
  {
    "name":"Turkey",
    "id":"TR"
  },
  {
    "name":"Uganda",
    "id":"UG"
  },
  {
    "name":"Ukraine",
    "id":"UA"
  },
  {
    "name":"United Arab Emirates",
    "id":"AE"
  },
  {
    "name":"United Kingdom",
    "id":"GB"
  },
  {
    "name":"Western Sahara",
    "id":"EH"
  },
  {
    "name":"Yemen",
    "id":"YE"
  },
  {
    "name":"Zambia",
    "id":"ZM"
  },
  {
    "name":"Zimbabwe",
    "id":"ZW"
  }
]

@shandou
Copy link

shandou commented Jul 30, 2021

Thanks for the list.
Is there any known standard that governs which countries fall under a region?
Or is it your best understanding of how countries are divided upon regions?

I have the same question about the origin of this list. Thank you!

@jordigg
Copy link

jordigg commented May 18, 2022

Hi there, United States current ISO code name is "United States of America" instead of "United States". Link here.

@richjenks
Copy link
Author

I made a few tweaks following the comments above:

  1. Koreas moved from EMEA to APAC
  2. South Sudan moved from APAC to EMEA
  3. "United States" corrected to "United States of America"

As far as I know, there isn't an ISO standard for "regions" of the world. Back in 2015 when I wrote this, I worked for a company that split its operations into AMER/APAC/EMEA and this list was used for various bits and bobs, e.g. routing support tickets to the right team. The assignment of regions is, therefore, written by me, which explains why there were a few errors :) Thanks to everyone who pointed them out!

Also, I chose not to include additional reserved countries, only listing the 249 current officially assigned ISO 3166-1 alpha-2 codes. It's an attempt at a "canonical" list of countries but that's not set in stone...only version control.

@ctung
Copy link

ctung commented Sep 20, 2023

an easy way to digest this in python:

import pandas as pd
import requests
from io import StringIO

resp = requests.get("https://gist.githubusercontent.com/richjenks/15b75f1960bc3321e295/raw/e9b473faed0c7512d6720d71d485b662cd743d25/countries.md", timeout=30)
df = pd.read_csv(StringIO(resp.text, sep='|')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment