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

Add states for US cities #37

Open
pranavsb opened this issue Oct 4, 2020 · 1 comment
Open

Add states for US cities #37

pranavsb opened this issue Oct 4, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@pranavsb
Copy link
Member

pranavsb commented Oct 4, 2020

The options in world_cities.dart are taken from simplemaps (free, smaller version of the database).
Only the cities with more than 100,000 population have been chosen. For cities with a common name (in ASCII) and a common country, the city with higher population is chosen.

This can lead to some confusion, esp. in the US, which has multiple states with the same city name.

The workaround is to choose your city in the dropdown (say Gainesville, United States) and check the map to see if we're putting you in Gainesville, FL or Gainesville, GA (spoiler alert: it's Georgia).

Then you'd have to fall back to searching for the nearest city which is included in the list, which is made hard by the fact that many US cities have been included, with no state, so you can't search by your state.

@pranavsb pranavsb added enhancement New feature or request good first issue Good for newcomers labels Oct 4, 2020
@pranavsb
Copy link
Member Author

pranavsb commented Oct 4, 2020

To get started on this, just look at scripts directory and download the simplemaps csv from their website.
A small modification in the script (to account for country == "United States" and append 2 letter state code to the city, country string should solve our problem.

For a complete fix, we would also have to go back to the dashboard to fix some cases where such ambiguous cities have been chosen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants