Country Names and Codes

From Data Quality Wiki
Jump to: navigation, search


The most commonly used standard for uniquely referring to country names is the ISO 3166-1 standard. This standard defines three different codes:

  • ISO 3166-1 alpha-2 Two-letter alphabetic code. Example: DE for Germany.
  • ISO 3166-1 alpha-2 Three-letter alphabetic code. Example: DEU for Germany.
  • ISO 3166-1 numeric Three-digit numeric code. Example: 276 for Germany.

ISO codes are maintained to only represent present-day countries. There is a 4-letter ISO standard ISO 3166-3 for countries which merged, were divided, or changed name; but it only reaches back to 1974. There is no ISO standard for pre-1974 historical countries, like Prussia.

Potential problems

  • Ambiguous country names
  • Geographic position does not match specified country
  • Country not specified, but subdivision/region
  • Historical countries that do not exist anymore (e.g. Yugoslavia)
  • Countries with territorial changes
  • Location does not match the coordinates, see Geolocation_Mistakes

Web services

See List of web services

Country name list

David has made a comprehensive list containing the name of all countries specified in ISO 3166 by up to 240 different expressions in various languages: File:Countries names.xml Caveat: Some country names are ambigous in different languages.

In case an unambiguous list is needed, a list with the conflicts removed is also available: File:Countries names unambiguous.xml

Possibility of own tool

A very rough check can be done with a list of rectangular bounding boxes for each country (Min/max Lat/Long). For a more detailed conversion of Lat/Long to ISO-codes a shapefile with country boundaries would have to be used. Those files are publicly available. E.g. geocommons, gadm, . Bounding boxes available on opengeocode

Country names in different languages are available at the translation project.on the Unicode Common Locale Data Repository or, sorted by language, on Umpirskys github


Wikipedia:ISO 3166-1

Official ISO 3166-1 decoding table