DataPackage Viewer


Comprehensive country codes: ISO 3166, ITU, ISO 4217 currency codes and many more


Data Files

country-codes

Field Information

Field Name Order Type (Format) Description
FIFA 1 string Codes assigned by the Fédération Internationale de Football Association
Dial 2 string Country code from ITU-T recommendation E.164, sometimes followed by area code
ISO3166-1-Alpha-3 3 string Alpha-3 codes from ISO 3166-1 (synonymous with World Bank Codes)
MARC 4 string MAchine-Readable Cataloging codes from the Library of Congress
is_independent 5 string Country status, based on the CIA World Factbook
ISO3166-1-numeric 6 string Numeric codes from ISO 3166-1
GAUL 7 string Global Administrative Unit Layers from the Food and Agriculture Organization
FIPS 8 string Codes from the U.S. standard FIPS PUB 10-4
WMO 9 string Country abbreviations by the World Meteorological Organization
ISO3166-1-Alpha-2 10 string Alpha-2 codes from ISO 3166-1
ITU 11 string Codes assigned by the International Telecommunications Union
IOC 12 string Codes assigned by the International Olympics Committee
DS 13 string Distinguishing signs of vehicles in international traffic
UNTERM Spanish Formal 14 string Country's formal Spanish name from UN Protocol and Liaison Service
Global Code 15 string Country classification from United Nations Statistics Division
Intermediate Region Code 16 string Country classification from United Nations Statistics Division
official_name_fr 17 string Country or Area official French short name from UN Statistics Divsion
UNTERM French Short 18 string Country's short French name from UN Protocol and Liaison Service
ISO4217-currency_name 19 string ISO 4217 currency name
Developed / Developing Countries 20 string Country classification from United Nations Statistics Division
UNTERM Russian Formal 21 string Country's formal Russian name from UN Protocol and Liaison Service
UNTERM English Short 22 string Country's short English name from UN Protocol and Liaison Service
ISO4217-currency_alphabetic_code 23 string ISO 4217 currency alphabetic code
Small Island Developing States (SIDS) 24 string Country classification from United Nations Statistics Division
UNTERM Spanish Short 25 string Country's short Spanish name from UN Protocol and Liaison Service
ISO4217-currency_numeric_code 26 string ISO 4217 currency numeric code
UNTERM Chinese Formal 27 string Country's formal Chinese name from UN Protocol and Liaison Service
UNTERM French Formal 28 string Country's formal French name from UN Protocol and Liaison Service
UNTERM Russian Short 29 string Country's short Russian name from UN Protocol and Liaison Service
M49 30 number UN Statistics M49 numeric codes (nearly synonymous with ISO 3166-1 numeric codes, which are based on UN M49. ISO 3166-1 does not include Channel Islands or Sark, for example)
Sub-region Code 31 string Country classification from United Nations Statistics Division
Region Code 32 string Country classification from United Nations Statistics Division
official_name_ar 33 string Country or Area official Arabic short name from UN Statistics Divsion
ISO4217-currency_minor_unit 34 string ISO 4217 currency number of minor units
UNTERM Arabic Formal 35 string Country's formal Arabic name from UN Protocol and Liaison Service
UNTERM Chinese Short 36 string Country's short Chinese name from UN Protocol and Liaison Service
Land Locked Developing Countries (LLDC) 37 string Country classification from United Nations Statistics Division
Intermediate Region Name 38 string Country classification from United Nations Statistics Division
official_name_es 39 string Country or Area official Spanish short name from UN Statistics Divsion
UNTERM English Formal 40 string Country's formal English name from UN Protocol and Liaison Service
official_name_cn 41 string Country or Area official Chinese short name from UN Statistics Divsion
official_name_en 42 string Country or Area official English short name from UN Statistics Divsion
ISO4217-currency_country_name 43 string ISO 4217 country name
Least Developed Countries (LDC) 44 string Country classification from United Nations Statistics Division
Region Name 45 string Country classification from United Nations Statistics Division
UNTERM Arabic Short 46 string Country's short Arabic name from UN Protocol and Liaison Service
Sub-region Name 47 string Country classification from United Nations Statistics Division
official_name_ru 48 string Country or Area official Russian short name from UN Statistics Divsion
Global Name 49 string Country classification from United Nations Statistics Division
Capital 50 string Capital city from Geonames
Continent 51 string Continent from Geonames
TLD 52 string Top level domain from Geonames
Languages 53 string Languages from Geonames
Geoname ID 54 number Geoname ID
CLDR display name 55 string Country's customary English short name (CLDR)
EDGAR 56 string EDGAR country code from SEC

README

goodtables.io

Comprehensive country code information, including ISO 3166 codes, ITU dialing codes, ISO 4217 currency codes, and many others. Provided as a Tabular Data Package: view datapackage

Data

Data are fetched from multiple sources:

Official formal and short names (in English, French, Spanish, Arabic, Chinese, and Russian) are from United Nations Protocol and Liaison Service

Customary English short names are from Unicode Common Locale Data Repository (CLDR) Project.

Note: CLDR shorter names "ZZ-alt-short" are used when available

ISO 3166 official short names (in English, French, Spanish, Arabic, Chinese, and Russian) are from United Nations Department of Ecoonomic and Social Affairs Statistics Division

ISO 4217 currency codes are from currency-iso.org

Many other country codes are from statoids.com

Special thanks to Gwillim Law for his excellent statoids.com site (some of the field descriptions are excerpted from his site), which is more up-to-date than most similar resources and is much easier to scrape than multiple Wikipedia pages.

Capital cities, languages, continents, TLDs, and geonameid are from geonames.org

EDGAR codes are from sec.gov

Preparation

This package includes Python scripts to fetch current country information from various data sources and output CSV of combined country code information.

CSV output is provided via the in2csv and csvcut utilities from csvkit

NOTE/TODO: currently, preparation requires manual process to download and rename 6 CSV files from https://unstats.un.org/unsd/methodology/m49/overview/

data/country-codes.csv

Install requirements:

pip install -r scripts/requirements.pip

Run GNU Make to generate data file:

make country-codes.csv

License

This material is licensed by its maintainers under the Public Domain Dedication and License.

Nevertheless, it should be noted that this material is ultimately sourced from ISO and other standards bodies and their rights and licensing policies are somewhat unclear. As this is a short, simple database of facts there is a strong argument that no rights can subsist in this collection. However, ISO state on their site:

ISO makes the list of alpha-2 country codes available for internal use and non-commercial purposes free of charge.

This carries the implication (though not spelled out) that other uses are not permitted and that, therefore, there may be rights preventing further general use and reuse.

If you intended to use these data in a public or commercial product, please check the original sources for any specific restrictions.

Related Projects at Open Knowledge International