Skip to content

Comprehensive dataset of global countries, currencies, and languages in standardized formats

License

Notifications You must be signed in to change notification settings

ccmars/world-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World Data

🌐 World Data (ISO Standards)

Any developer that works with an international user base will eventually need to determine what country their users are from, what language they speak and read, and sometimes even what currency their users make purchases in. The best way to keep track of that information is to follow the standards set forth by the International Organization for Standardization (ISO), which have become universally accepted since their development in the 1960s and 1970s.

This repository contains the 2024 ISO standard data for countries, currencies, and languages, in a variety of the most common data formats, including CSV, SQL, JSON, XML, YAML, and more.

🗂️ Formats

World data is available in the following formats:

CSV

HTML

JSON

Markdown

PHP

SQL

Microsoft Excel (XLSX)

XML

YAML

💽 Data

🌍 World Countries (ISO 3166)

The countries dataset contains the following data:

[integer] number: Numeric code of the country

[string] alpha2: Two-letter code of the country

[string] alpha3: Three-letter code of the country

[string] langEN: English name of the country

[string] langDE: German name of the country

[string] langES: Spanish name of the country

[string] langFR: French name of the country

[string] langIT: Italian name of the country

[string] tld: Country code top-level domain (ccTLD) of the country

💵 World Currencies (ISO 4217)

The currencies dataset contains the following data:

[integer] number: Numeric code of the currency

[string] alpha3: Three-letter code of the currency

[integer] decimals: Number of digits after the decimal

[string] langEN: English name of the currency

[string] langIT: Italian name of the currency

[string] symbol_decimal: Symbol of the currency in decimal numeric character reference codes, separated by semi-colons (;) if the symbol consists of multiple characters. For example, in HTML, turn the number 36 into $ to output a dollar symbol ($).

[string] symbol_hex: Symbol of the currency in hexadecimal numeric character reference codes, separated by semi-colons (;) if the symbol consists of multiple characters. For example, in HTML, turn the string 0024 into $ to output a dollar symbol ($). To achieve the same in JavaScript, use \u0024, and in CSS, use \0024.

🗣️ World Languages (ISO 639)

The languages dataset contains the following data:

[string] alpha2: Two-letter code of the language

[string] langEN: English name of the language

[string] langDE: German name of the language

[string] langES: Spanish name of the language

[string] langFR: French name of the language

[string] langIT: Italian name of the language

✅ Contributions

Need this data in another language or format? Pull requests for additional language translations or additional data formats will be gladly accepted.

Source Data

The source data for this repository is kept in CSV format in the /src/data directory. If you would like to contribute a new language translation or correct a content issue, this is where the data should be adjusted.

Conversion Scripts for New Formats

Conversion scripts are written in Python and located in the /src/scripts directory. If you would like to contribute a new format, this is where the conversion script should be added. These scripts convert the source CSV data into various formats available in the /dist directory.

Finalizing Your Contribution

Before running the main script to generate updated data, please ensure that you have installed the necessary dependencies. You can do this by running the following command:

pip install -r src/requirements.txt

In src/main.py, increase the minor version by one (or patch version by one if no new languages or formats were added) in the version_string variable, and then run the main script to complete the data generation process:

python3 src/main.py

Finally, submit a pull request with your changes and it will be reviewed promptly. Thank you for your contribution!