Country codes
Getting a comprehensive record of countries and their relevant codes for a project as a developer is really tough(at least as at the time of writing this). I have gone through the internet and was unable to find a complete and comprehensive data until I stumbled on this. The data is given in CSV and JSON format, but I have processed and converted it to a database .sql table file available for download.
The following shows the field information and description of the data.
Field Information
Field Name | Order | Type (Format) | Description |
---|---|---|---|
name | 1 | string | Country’s customary English short name (CLDR) |
official_name_en | 2 | string | Country’s official English short name |
official_name_fr | 3 | string | Country’s offical French short name |
ISO3166-1-Alpha-2 | 4 | string | Alpha-2 codes from ISO 3166-1 |
ISO3166-1-Alpha-3 | 5 | string | Alpha-3 codes from ISO 3166-1 (synonymous with World Bank Codes) |
UN Statistics M49 numeric codes | 6 | integer | 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) |
ITU | 7 | string | Codes assigned by the International Telecommunications Union |
MARC | 8 | string | MAchine-Readable Cataloging codes from the Library of Congress |
WMO | 9 | string | Country abbreviations by the World Meteorological Organization |
DS | 10 | string | Distinguishing signs of vehicles in international traffic |
Dial | 11 | string | Country code from ITU-T recommendation E.164, sometimes followed by area code |
FIFA | 12 | string | Codes assigned by the Fédération Internationale de Football Association |
FIPS | 13 | string | Codes from the U.S. standard FIPS PUB 10-4 |
GAUL | 14 | string | Global Administrative Unit Layers from the Food and Agriculture Organization |
IOC | 15 | string | Codes assigned by the International Olympics Committee |
ISO4217-currency_alphabetic_code | 16 | string | ISO 4217 currency alphabetic code |
ISO4217-currency_country_name | 17 | string | ISO 4217 country name |
ISO4217-currency_minor_unit | 18 | integer | ISO 4217 currency number of minor units |
ISO4217-currency_name | 19 | string | ISO 4217 currency name |
ISO4217-currency_numeric_code | 20 | integer | ISO 4217 currency numeric code |
is_independent | 21 | string | Country status, based on the CIA World Factbook |
Capital | 22 | string | Capital city from Geonames |
Continent | 23 | string | Continent from Geonames |
TLD | 24 | string | Top level domain from Geonames |
Languages | 25 | string | Languages from Geonames |
Geoname ID | 26 | integer | Geoname ID |
EDGAR | 27 | string | EDGAR country code from SEC |
Please refer to original source for more info and to download the raw CSV and JSON data formats