Git Product home page Git Product logo

country-codes's Introduction

Comprehensive country code information, including ISO 3166 codes, ITU dialing codes, ISO 4217 currency codes, and many others. Provided as a Simple Data Format Data Package.

Data

Data comes from multiple sources as follows.

ISO 3166 offical English and French short names are from iso.org Note: ISO is no longer providing these code lists for free.

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.

Preparation

This package includes a Python script to fetch current country information and output a JSON document of combined country code information. Per-country JSON documents may be keyed by any of the fields below.

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

Run scripts/get_countries_of_earth.py --help for usage information

data/country-codes.csv

Install requirements:

pip install -r scripts/requirements.pip

Run the python script to generate json file:

python scripts/get_countries_of_earth.py -l

Convert json file to csv (and reorder columns):

in2csv data/country-codes.json > data/country-codes.csv
python scripts/reorder_columns.py

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.

country-codes's People

Contributors

defuz avatar ewheeler avatar hozn avatar rufuspollock avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.