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

UK states and no cities #784

Open
coxy17 opened this issue Jun 9, 2024 · 4 comments
Open

UK states and no cities #784

coxy17 opened this issue Jun 9, 2024 · 4 comments
Labels
question Further information is requested

Comments

@coxy17
Copy link

coxy17 commented Jun 9, 2024

Hi

I am using the demo https://dr5hn.github.io/countries-states-cities-database/ and search for e.g. United Kingdom > Nottinghamshire and there are no cities displayed?

Capture

Any ideas why its not working?

thanks

Nick

@dosubot dosubot bot added the question Further information is requested label Jun 9, 2024
Copy link

dosubot bot commented Jun 9, 2024

Hey there, @coxy17! I'm here to help you out. If you need assistance with bugs, questions, or want to become a contributor, feel free to ask.

The reason no cities are displayed when you search for "United Kingdom > Nottinghamshire" in the Country State City Demo is likely due to an issue with the script responsible for fetching city data. The script uses an API to retrieve city information, and if the API call fails or the data is not properly processed, the cities will not be displayed.

Ensure that the API key is valid, the API call limit has not been exceeded, and the data is being correctly processed and stored. If any of these steps fail, the cities for Nottinghamshire will not be displayed [1][2].

To continue talking to Dosu, mention @dosu.

@coxy17
Copy link
Author

coxy17 commented Jun 9, 2024

Hi
Ok thanks I will check out the API too just incase. I also checked the Demo again and found that the cities do display when selecting 'England' as a state. Why is 'England' a state? is there an error with the demo?

Capture

Copy link

dosubot bot commented Jun 9, 2024

"England" is listed as a state in the "Country State City DB Demo" because the database categorizes it as a state within the United Kingdom. This is a common approach in databases to handle subdivisions within countries. The database includes various subdivisions such as "City of Nottingham," "Buckinghamshire," and "Cambridgeshire" under the United Kingdom [1].

No cities are displayed when searching for "United Kingdom > Nottinghamshire" because the database might not have cities listed for that specific state. This could be due to incomplete data or an issue with how the data is being fetched or displayed in the demo. The database does include other regions and cities, but it appears that Nottinghamshire might be missing or not properly linked in the dataset [2].

To continue talking to Dosu, mention @dosu.

@coxy17
Copy link
Author

coxy17 commented Jun 9, 2024

Ok so where is the data being pulled from to use in this library?

'England' and 'Nottinghamshire' cannot be both under the same state as 'Nottinghamshire' is a county. So i can see why it does not fit into the model as there needs to be another level. The same issue for 'Towns' appearing alongside 'Cities' e.g. 'Hucknall'. So the lists are not working for the UK. Its missing the breakdown e.g.

an overall example of a UK town is:
United Kingdom > England > Nottinghamshire > Nottingham > Hucknall

I am assuming that I cant use this library to break down like the example above.

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

No branches or pull requests

1 participant