Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative names #26

Open
gajus opened this issue Feb 10, 2015 · 3 comments
Open

Alternative names #26

gajus opened this issue Feb 10, 2015 · 3 comments

Comments

@gajus
Copy link

gajus commented Feb 10, 2015

The lookup using remote sources will often fail because rarely does anyone use the official name (e.g. Russian Federation vs Russian and People's Republic of China vs China).

CountryData.lookup.countries({name: 'Russia'}); // Russian Federation
CountryData.lookup.countries({name: 'China'}); // People's Republic of China
CountryData.lookup.countries({name: 'USA'}); // The United States of America, United States, America
CountryData.lookup.countries({name: 'Iran'}); // Persia, Islamic Republic of Iran
CountryData.lookup.countries({name: 'Vietnam'}); // Socialist Republic of Vietnam

It would make sense to have "name_aka" field in JSON that would describe common variations.

@evdb
Copy link
Member

evdb commented Feb 17, 2015

The need for a name_aka field of some sort is clear. However I wonder if what you're suggesting could also be used to provide the country name in other languages?

Any thoughts on that?

@gajus
Copy link
Author

gajus commented Feb 17, 2015

From data normalisation perspective, I would like it to be something along the lines of:

names: [
    {
        name: 'Lithuania',
        language: 'en', /* ISO 639-1 */
        attributes: [
            'aka'
        ]
    },
    {
        name: 'Republic of Lithuania',
        language: 'en',
        attributes: [
            'official-name'
        ]
    },
    {
        name: 'Lietuva',
        language: 'lt',
        attributes: [
            'aka'
        ]
    },
    {
        name: 'Lietuvos Respublika',
        language: 'lt',
        attributes: [
            'official-name'
        ]
    }
]

See #28

@ziggamon
Copy link

Geonames has been handling this for a long time (and also has relevant data).
Look at for example: http://www.geonames.org/countries/US/united-states.html
(it allows multiple names per language. So it would hit for both USA U.S.A. U.S. and United Stated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants