Added localized names dataset

This commit is contained in:
Chris 2022-11-01 23:39:26 +01:00
parent ccabeece4b
commit 29c6a467a9
4 changed files with 48 additions and 4 deletions

7
CHANGES.md Normal file
View File

@ -0,0 +1,7 @@
# Changes
### 2022.11.0
- Added: names_* datasets for localized country names
- Added: names_all dataset for all localized country names

View File

@ -3,8 +3,29 @@
This is a dataset for noccylabs/dataset holding country names and the respective This is a dataset for noccylabs/dataset holding country names and the respective
ISO3166 alpha2 and alpha3 codes. ISO3166 alpha2 and alpha3 codes.
## Usage
```php
$ds = $dm->openDataset("noccylabs/dataset-iso3166#countries"); ## Datasets
```
### `#countries`
Column | Type | Comment | Example
---|---|---|---
`country` | string | Country name in english | *Sweden*
`state` | string | Full name of state | *The Kingdom of Sweden*
`alpha2` | string | 2-letter country code | *SE*
`alpha3` | string | 3-letter country code | *SWE*
`numeric` | int | Numeric country code | *752*
`tld` | string | Internet top-level domain name | *.se*
### `#names_{lang}`
Column | Type | Comment | Example
---|---|---|---
`lang` | string | Language code | *sv_SE*
`iso` | string | ISO 3166 country code | *SE*
`localname` | string | Name of country in local language | *Sverige*
`alternatenames` | string | Alternate local names separated by `;` |
`canonical` | int | If *1*, `localname` is the canonical name of the country in local language |

10
data/names_sv_se.csv Normal file
View File

@ -0,0 +1,10 @@
"lang","iso","localname","alternatenames","canonical"
"sv_SE","SE","Sverige","",1
"sv_SE","NO","Norge","",0
"sv_SE","DK","Danmark","",0
"sv_SE","FI","Finland","",0
"sv_SE","AX","Åland","",0
"sv_SE","EE","Estland","",0
"sv_SE","LV","Lettland","",0
"sv_SE","LT","Litauen","",0
"sv_SE","PL","Polen","",0
1 lang iso localname alternatenames canonical
2 sv_SE SE Sverige 1
3 sv_SE NO Norge 0
4 sv_SE DK Danmark 0
5 sv_SE FI Finland 0
6 sv_SE AX Åland 0
7 sv_SE EE Estland 0
8 sv_SE LV Lettland 0
9 sv_SE LT Litauen 0
10 sv_SE PL Polen 0

View File

@ -2,6 +2,12 @@
"datasets": { "datasets": {
"countries": { "countries": {
"filename": "data/iso3166.csv" "filename": "data/iso3166.csv"
},
"names_all": {
"filename": "data/names_*.csv"
},
"names_sv_se": {
"filename": "data/names_sv_se.csv"
} }
} }
} }