Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rgieseke/shortcountrynames
Data Package with short country names
https://github.com/rgieseke/shortcountrynames
Last synced: 2 months ago
JSON representation
Data Package with short country names
- Host: GitHub
- URL: https://github.com/rgieseke/shortcountrynames
- Owner: rgieseke
- License: cc0-1.0
- Created: 2017-07-12T16:30:20.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-07-14T11:48:07.000Z (over 1 year ago)
- Last Synced: 2024-10-09T16:58:55.164Z (2 months ago)
- Language: Python
- Size: 63.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![PyPI](https://img.shields.io/pypi/v/shortcountrynames.svg)](https://pypi.org/project/shortcountrynames/)
[![npm](https://img.shields.io/npm/v/shortcountrynames.svg)](https://www.npmjs.com/package/shortcountrynames)“Do One Thing and Do It Well” - this package helps turning two or three letter
codes into short English names.`shortcountrynames` is maintained by Robert Gieseke ().
## Data Package
[Data Package](http://frictionlessdata.io/), a simple
[CSV file](shortcountrynames.csv), with two and three-letter country
codes and short English country names based on the [country-codes](https://github.com/datasets/country-codes) Data Package with some
changes and additions to the choice of short names.## Python module
Install with
```
pip install shortcountrynames
```Usage
```py
from shortcountrynames import to_nameassert to_name("DE") == "Germany"
assert to_name("DEU") == "Germany"
```## JavaScript module
Install with
```
npm install shortcountrynames
```Usage
```js
import {names, to_name} from 'shortcountrynames'// Define custom codes
names["TEST"] = 'test'console.log(to_name("DEU")) // Germany
console.log(to_name("TEST")) // test
```## Notes
Non-standard codes:
`EU`, `EUU` - European Union
`XK`, `XKX` - Kosovo
## License
CC0