MartinsOnuoha / countriesNowAPI

CountriesNow is an Open source API for retrieving geo-information for countries, including their states, cities, population, etc. 🌎
http://countriesnow.space
MIT License
179 stars 55 forks source link

Missing Basel-Stadt in Switzerland #97

Closed christianbayer closed 2 years ago

christianbayer commented 2 years ago

Hey there!

First of all, thank you for this awesome pack of locations. Great work! 👏

In our application, we reach to a problem with Basel city, in Switzerland. The file model/countriesAndCities.js has the Basel city, but we do not use this one. We use the model/countriesStateCity.js, which has only Basel-Landschaft Kanton, not the Basel-Stadt Kanton. Basel city (i think, as of my research, I'm not from Switzerland, but we have some users from there) should be inside of Basel-Stadt Kanton. Example:

...
{
    "name": "Basel-Stadt",
    "code": "BS",
    "cities": [
        {
            "name": "Basel",
            "latitude": "...",
            "longitude": "..."
        },
}
...

Refs: https://en.wikipedia.org/wiki/Basel-Stadt https://en.wikipedia.org/wiki/Basel-Landschaft

MartinsOnuoha commented 2 years ago

Hi Christian, thanks for reporting this inconsistency 🎉. I'll have a look into this immediately and open a PR to fix this.

MartinsOnuoha commented 2 years ago

So I made a bit of research and it looks like Basel-Stadt is also referred to as Basel-City and Basel-Stadt is not exactly a city, but more of a canton ( a subdivision of a country ) or even closer to a state. Since Basel is the capital of Basel-Stadt you're right, so Basel is a city within Basel-Stadt (a state/half-canton).

Here's what I think makes sense, include this example you've provided within the countriesStateCity.js file, and leave everything else as is.

MartinsOnuoha commented 2 years ago

Hi Christian, @christianbayer you can have a look at the open PR to resolve this.

christianbayer commented 2 years ago

Hi @MartinsOnuoha, i think that's it!