Comprehensive country codes: ISO 3166, ITU, ISO 4217 currency codes and many more
Files | Size | Format | Created | Updated | License | Source |
---|---|---|---|---|---|---|
1 | 146 kB | csv | 2 months ago | Open Data Commons Public Domain Dedication and License v1.0 | United Nations Protocol and Liaison Service |
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 are fetched ...
Data Files
File | Description | Size | Last modified | Download |
---|---|---|---|---|
country-codes | 146 kB | 2 months ago | country-codes |
Data Previews
country-codes
Schema
name | type | description | constraints | title |
---|---|---|---|---|
FIFA | string | Codes assigned by the Fédération Internationale de Football Association | FIFA code | |
Dial | string | Country code from ITU-T recommendation E.164, sometimes followed by area code | telephone dialing code | |
ISO3166-1-Alpha-3 | string | Alpha-3 codes from ISO 3166-1 (synonymous with World Bank Codes) | { "unique": true, "maxLength": 3, "minLength": 3 } | ISO3166-1-Alpha-3 |
MARC | string | MAchine-Readable Cataloging codes from the Library of Congress | MARC code | |
is_independent | string | Country status, based on the CIA World Factbook | independent country | |
ISO3166-1-numeric | string | Numeric codes from ISO 3166-1 | ISO3166-1-numeric | |
GAUL | string | Global Administrative Unit Layers from the Food and Agriculture Organization | GAUL code | |
FIPS | string | Codes from the U.S. standard FIPS PUB 10-4 | FIPS code | |
WMO | string | Country abbreviations by the World Meteorological Organization | { "maxLength": 2 } | WMO code |
ISO3166-1-Alpha-2 | string | Alpha-2 codes from ISO 3166-1 | { "unique": true, "maxLength": 2, "minLength": 2 } | ISO3166-1-Alpha-2 |
ITU | string | Codes assigned by the International Telecommunications Union | ITU code | |
IOC | string | Codes assigned by the International Olympics Committee | { "maxLength": 3 } | IOC code |
DS | string | Distinguishing signs of vehicles in international traffic | distinguishing signs of vehicles | |
UNTERM Spanish Formal | string | Country's formal Spanish name from UN Protocol and Liaison Service | UNTERM Spanish Formal | |
Global Code | string | Country classification from United Nations Statistics Division | global code | |
Intermediate Region Code | string | Country classification from United Nations Statistics Division | intermediate region code | |
official_name_fr | string | Country or Area official French short name from UN Statistics Division | official name French | |
UNTERM French Short | string | Country's short French name from UN Protocol and Liaison Service | UNTERM French Short | |
ISO4217-currency_name | string | ISO 4217 currency name | ISO4217-currency_name | |
UNTERM Russian Formal | string | Country's formal Russian name from UN Protocol and Liaison Service | UNTERM Russian Formal | |
UNTERM English Short | string | Country's short English name from UN Protocol and Liaison Service | UNTERM English Short | |
ISO4217-currency_alphabetic_code | string | ISO 4217 currency alphabetic code | ISO4217-currency_alphabetic_code | |
Small Island Developing States (SIDS) | string | Country classification from United Nations Statistics Division | small island developing state (SIDS) | |
UNTERM Spanish Short | string | Country's short Spanish name from UN Protocol and Liaison Service | UNTERM Spanish Short | |
ISO4217-currency_numeric_code | string | ISO 4217 currency numeric code | ISO4217-currency_numeric_code | |
UNTERM Chinese Formal | string | Country's formal Chinese name from UN Protocol and Liaison Service | UNTERM Chinese Formal | |
UNTERM French Formal | string | Country's formal French name from UN Protocol and Liaison Service | UNTERM French Formal | |
UNTERM Russian Short | string | Country's short Russian name from UN Protocol and Liaison Service | UNTERM Russian Short | |
M49 | 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) | { "unique": true } | M49 |
Sub-region Code | string | Country classification from United Nations Statistics Division | sub-region code | |
Region Code | string | Country classification from United Nations Statistics Division | region code | |
official_name_ar | string | Country or Area official Arabic short name from UN Statistics Division | official name Arabic | |
ISO4217-currency_minor_unit | string | ISO 4217 currency number of minor units | ISO4217-currency_minor_unit | |
UNTERM Arabic Formal | string | Country's formal Arabic name from UN Protocol and Liaison Service | UNTERM Arabic Formal | |
UNTERM Chinese Short | string | Country's short Chinese name from UN Protocol and Liaison Service | UNTERM Chinese Short | |
Land Locked Developing Countries (LLDC) | string | Country classification from United Nations Statistics Division | land locked developing country (LLDC) | |
Intermediate Region Name | string | Country classification from United Nations Statistics Division | intermediate region name | |
official_name_es | string | Country or Area official Spanish short name from UN Statistics Division | official name Spanish | |
UNTERM English Formal | string | Country's formal English name from UN Protocol and Liaison Service | UNTERM English Formal | |
official_name_cn | string | Country or Area official Chinese short name from UN Statistics Division | official name Chinese | |
official_name_en | string | Country or Area official English short name from UN Statistics Division | official name English | |
ISO4217-currency_country_name | string | ISO 4217 country name | ISO4217-currency_country_name | |
Least Developed Countries (LDC) | string | Country classification from United Nations Statistics Division | least developed country (LDC) | |
Region Name | string | Country classification from United Nations Statistics Division | region name | |
UNTERM Arabic Short | string | Country's short Arabic name from UN Protocol and Liaison Service | UNTERM Arabic Short | |
Sub-region Name | string | Country classification from United Nations Statistics Division | sub-region name | |
official_name_ru | string | Country or Area official Russian short name from UN Statistics Division | official name Russian | |
Global Name | string | Country classification from United Nations Statistics Division | global name | |
Capital | string | Capital city from Geonames | capital city | |
Continent | string | Continent from Geonames | { "maxLength": 2, "minLength": 2 } | continent |
TLD | string | Top level domain from Geonames | TLD | |
Languages | string | Languages from Geonames | languages | |
Geoname ID | number | Geoname ID | { "unique": true } | Geoname ID |
CLDR display name | string | Country's customary English short name (CLDR) | CLDR display name | |
EDGAR | string | EDGAR country code from SEC | { "maxLength": 2 } | EDGAR code |
Description
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 Economic 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.txt
Run GNU Make to generate data file:
make update #then make clean
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.