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

FilesSizeFormatCreatedUpdatedLicenseSource
1146 kBcsv2 months agoOpen Data Commons Public Domain Dedication and License v1.0United 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 ...

Read more

Data Files

FileDescriptionSizeLast modifiedDownload
country-codes
146 kB2 months ago
country-codes

Data Previews

country-codes

Schema

nametypedescriptionconstraintstitle
FIFAstringCodes assigned by the Fédération Internationale de Football AssociationFIFA code
DialstringCountry code from ITU-T recommendation E.164, sometimes followed by area codetelephone dialing code
ISO3166-1-Alpha-3stringAlpha-3 codes from ISO 3166-1 (synonymous with World Bank Codes){ "unique": true, "maxLength": 3, "minLength": 3 }ISO3166-1-Alpha-3
MARCstringMAchine-Readable Cataloging codes from the Library of CongressMARC code
is_independentstringCountry status, based on the CIA World Factbookindependent country
ISO3166-1-numericstringNumeric codes from ISO 3166-1ISO3166-1-numeric
GAULstringGlobal Administrative Unit Layers from the Food and Agriculture OrganizationGAUL code
FIPSstringCodes from the U.S. standard FIPS PUB 10-4FIPS code
WMOstringCountry abbreviations by the World Meteorological Organization{ "maxLength": 2 }WMO code
ISO3166-1-Alpha-2stringAlpha-2 codes from ISO 3166-1{ "unique": true, "maxLength": 2, "minLength": 2 }ISO3166-1-Alpha-2
ITUstringCodes assigned by the International Telecommunications UnionITU code
IOCstringCodes assigned by the International Olympics Committee{ "maxLength": 3 }IOC code
DSstringDistinguishing signs of vehicles in international trafficdistinguishing signs of vehicles
UNTERM Spanish FormalstringCountry's formal Spanish name from UN Protocol and Liaison ServiceUNTERM Spanish Formal
Global CodestringCountry classification from United Nations Statistics Divisionglobal code
Intermediate Region CodestringCountry classification from United Nations Statistics Divisionintermediate region code
official_name_frstringCountry or Area official French short name from UN Statistics Divisionofficial name French
UNTERM French ShortstringCountry's short French name from UN Protocol and Liaison ServiceUNTERM French Short
ISO4217-currency_namestringISO 4217 currency nameISO4217-currency_name
UNTERM Russian FormalstringCountry's formal Russian name from UN Protocol and Liaison ServiceUNTERM Russian Formal
UNTERM English ShortstringCountry's short English name from UN Protocol and Liaison ServiceUNTERM English Short
ISO4217-currency_alphabetic_codestringISO 4217 currency alphabetic codeISO4217-currency_alphabetic_code
Small Island Developing States (SIDS)stringCountry classification from United Nations Statistics Divisionsmall island developing state (SIDS)
UNTERM Spanish ShortstringCountry's short Spanish name from UN Protocol and Liaison ServiceUNTERM Spanish Short
ISO4217-currency_numeric_codestringISO 4217 currency numeric codeISO4217-currency_numeric_code
UNTERM Chinese FormalstringCountry's formal Chinese name from UN Protocol and Liaison ServiceUNTERM Chinese Formal
UNTERM French FormalstringCountry's formal French name from UN Protocol and Liaison ServiceUNTERM French Formal
UNTERM Russian ShortstringCountry's short Russian name from UN Protocol and Liaison ServiceUNTERM Russian Short
M49numberUN 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 CodestringCountry classification from United Nations Statistics Divisionsub-region code
Region CodestringCountry classification from United Nations Statistics Divisionregion code
official_name_arstringCountry or Area official Arabic short name from UN Statistics Divisionofficial name Arabic
ISO4217-currency_minor_unitstringISO 4217 currency number of minor unitsISO4217-currency_minor_unit
UNTERM Arabic FormalstringCountry's formal Arabic name from UN Protocol and Liaison ServiceUNTERM Arabic Formal
UNTERM Chinese ShortstringCountry's short Chinese name from UN Protocol and Liaison ServiceUNTERM Chinese Short
Land Locked Developing Countries (LLDC)stringCountry classification from United Nations Statistics Divisionland locked developing country (LLDC)
Intermediate Region NamestringCountry classification from United Nations Statistics Divisionintermediate region name
official_name_esstringCountry or Area official Spanish short name from UN Statistics Divisionofficial name Spanish
UNTERM English FormalstringCountry's formal English name from UN Protocol and Liaison ServiceUNTERM English Formal
official_name_cnstringCountry or Area official Chinese short name from UN Statistics Divisionofficial name Chinese
official_name_enstringCountry or Area official English short name from UN Statistics Divisionofficial name English
ISO4217-currency_country_namestringISO 4217 country nameISO4217-currency_country_name
Least Developed Countries (LDC)stringCountry classification from United Nations Statistics Divisionleast developed country (LDC)
Region NamestringCountry classification from United Nations Statistics Divisionregion name
UNTERM Arabic ShortstringCountry's short Arabic name from UN Protocol and Liaison ServiceUNTERM Arabic Short
Sub-region NamestringCountry classification from United Nations Statistics Divisionsub-region name
official_name_rustringCountry or Area official Russian short name from UN Statistics Divisionofficial name Russian
Global NamestringCountry classification from United Nations Statistics Divisionglobal name
CapitalstringCapital city from Geonamescapital city
ContinentstringContinent from Geonames{ "maxLength": 2, "minLength": 2 }continent
TLDstringTop level domain from GeonamesTLD
LanguagesstringLanguages from Geonameslanguages
Geoname IDnumberGeoname ID{ "unique": true }Geoname ID
CLDR display namestringCountry's customary English short name (CLDR)CLDR display name
EDGARstringEDGAR country code from SEC{ "maxLength": 2 }EDGAR code

badge

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:

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

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.

© 2024 All rights reservedBuilt with DataHub Cloud