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

Almost all "States" in the United Kingdom returns an empty City #192

Closed
Philx62 opened this issue Nov 15, 2024 · 10 comments · Fixed by #193
Closed

Almost all "States" in the United Kingdom returns an empty City #192

Philx62 opened this issue Nov 15, 2024 · 10 comments · Fixed by #193

Comments

@Philx62
Copy link

Philx62 commented Nov 15, 2024

Hello, tried getting list of cities from the UK but most returns an empty list.

this is my request parameter:

https://countriesnow.space/api/v0.1/countries/state/cities/q?country=United%20Kingdom&state=Aberdeen

and this is my returned value :

{
"error": false,
"msg": "cities in state Aberdeen of country United Kingdom retrieved",
"data": []
}

II initially thought the issue might be with a specific state (e.g., Aberdeen), but I tested about 70% of UK states and got the same result. the only working states i could find was England, Wales and Scotland.

@MartinsOnuoha
Copy link
Owner

Hi @Philx62 we had a similar thread opened here
#182
Do you think you could follow up on this thread?

@MartinsOnuoha
Copy link
Owner

@Philx62 do you expect this structure?

The United Kingdom (UK) does not have "states" like the United States. Instead, it is divided into four constituent countries, each with its own system of governance and regional identities. These are:

England
Scotland
Wales
Northern Ireland
Each country is further divided into smaller administrative regions:

England: Includes counties such as Yorkshire, Cornwall, and Kent.
Scotland: Divided into council areas like Glasgow City and Highland.
Wales: Divided into principal areas like Cardiff and Swansea.
Northern Ireland: Comprises districts like Belfast and Derry City and Strabane.

@Philx62
Copy link
Author

Philx62 commented Nov 17, 2024

Hi @MartinsOnuoha,
yes this is the structure i expected.
but using the current setup if Northern Ireland is selected as a state to display a list of cities there is no data for these cities.

@MartinsOnuoha
Copy link
Owner

Okay I understand that's the current experience, but I would be making updates to return the districts instead of empty data
@Philx62

@Adebesin-Cell
Copy link

Okay I understand that's the current experience, but I would be making updates to return the districts instead of empty data @Philx62

That'll be cool! Thank you. I thought something was wrong with my approach when cities weren't returned 😅.

@Adebesin-Cell
Copy link

Screenshot 2024-11-18 at 7 19 35 AM

If it helps it seems when I select a state to fetch cities (I suppose now it'll return districts) in uk, it returns State not found, perhaps it can also be resolved, thanks! 👍

@MartinsOnuoha
Copy link
Owner

Thanks Adebesin, I'll resolve this alongside.

@Adebesin-Cell
Copy link

Thanks Adebesin, I'll resolve this alongside.

Cool! Thanks, great work 👏

@Philx62
Copy link
Author

Philx62 commented Nov 22, 2024

Hey @MartinsOnuoha how's the returns for the cities in the UK going? any roadblocks?

MartinsOnuoha added a commit that referenced this issue Nov 25, 2024
update United Kingdom states and city list, using the constituent
countries as states and their cities and settlements.

Closes #192, closes #182
@MartinsOnuoha
Copy link
Owner

@Philx62 there's an open MR now, feel free to have a look before it's merged.
#193

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

Successfully merging a pull request may close this issue.

3 participants