When working with maps, it’s a common task to want to fill a map based on some classification and associate it using color with other countries in the same classification. A code table that includes both the ISO 3166 codes and the United Nations codes is not available…so I made one. The World Health Organization (WHO) regions weren’t part of my original plan but I ended up including these, too.
The table is freely available for download here.
This visualization is an example of the usefulness of the combined table. The source data was in ISO 3166 but we wanted to emphasize the United Nations region category.
How to use the table
The data is saved in tab delimited format. I recommend first importing the table into Excel and exploring it. A feature that you will see right away if you look at Afghanistan is that the country is listed twice. Scrolling over to the right, you’ll see that the United Nations designates Afghanistan as a country in both the “Least developed countries” and the “Landlocked developing countries” categories. You can either treat they key as one of the alpha-2, alpha-3, or number-3 codes and remove one of the records contains a U.N. category you don’t want to use. Or, keep both records and retain flexibility to display Afghanistan as both landlocked developing country and a least developed country. Using count distinct on a key field elsewhere in your application will still provide a count of the countries you have a code set for.
Most of the code values and descriptions will be familiar and irrefutable. Other information is not established as a convention. For example, the U.N. acknowledges that “there is no established convention for the designation of developed and developing countries or areas.” Refer to the footnotes at the U.N. source link for further information.
Missing value indicator: Values that are not defined by the sponsor, or not applicable, are indicated with a code value of
--, two dashes.
The oceans are included. There is no international convention for ISO codes for oceans. The ISO 3166 standard allows for the implemntation of X* series codes to meet user implementation requirements.
A code is included for high altitude.
For the oceans and high altitude only, just the three fields
isoAlphaTwo are implemented in the code table. All remaining values are coded with the missing value indicator.
Both the ocean codes and the high altitude code can be be safely deleted without impacting any of the country designations.
|isoCountryName||char(44)||The ISO country name.|
|shortEnglishName||char(44)||A friendly, short name in English. ISO provides a friendly English name. Some were still a bit awkward and I took liberties to make theses even more friendly. I used best judgement but you might want to make some adjustments depending on your application.|
|isoAlphaTwo||char(2)||ISO alpha two.|
|isoAlphaThree||char(3)||ISO alpha three.|
|isoNumThree||char(3)||I’ve seen this information implemented as an integer, e.g., Afghanistan’s ISO num three is 4 instead of 004. I followed the ISO convention. Implement as you need to for your application.|
|whoRegion||char(4)||Not all nations are WHO member states. As a result, not all nations in this list are associate with a WHO region. Countries not coded by the sponsor are coded here with the missing value indicator.|
|unWorldThree||char(4)||The UN world region value. All countries have the value
|unRegionThree||char(3)||The UN num three code value. As above with the ISO num 3, these code values are implemented here as released by the sponsor, with the
|unRegionName||char(8)||Name of the UN region.|
|unRegionSubregion||char(30)||The UN subregion code value.|
|unRegionSubregionName||char(25)||The name of the subregion. Countries not coded by the sponsor are coded here with the missing value indicator.|
|unSelectThree||char(3)||One of three code values. Countries not coded by the sponsor are coded here with the missing value indicator.|
|unSelectName||char(31)||Description of the select categorization.|
|unDevelopedThree||char(3)||UN code value for the developed region category. Countries not coded by the sponsor are coded here with the missing value indicator.|
|unDevelopedName||char(32)||Developed type. Countries not coded by the sponsor are coded here with the missing value indicator.|
|unDevelopedRegionName||char(64)||Developed regions name. Review the source information at the UN site to understand how this categorization is implemented. This name should be edited to make sense in the context of your application. Countries not coded by the sponsor are coded here with the missing value indicator.|
ISO Online Browsing Platform: https://www.iso.org/obp/ui/#home
United Nations Statistics Division, Standard country and area codes classification: http://unstats.un.org/unsd/methods/m49/m49regin.htm
WHO regions: http://www.who.int/about/regions/en/index.html
An extension of this table would include adding one or more of the other WHO region groupings.
I will try to keep the code table current.
You are welcome to submit a suggestion or bug report as a comment.