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

Singapore cities are missing but present in MaxMind DB #39

Closed
erbunao opened this issue Sep 26, 2019 · 2 comments
Closed

Singapore cities are missing but present in MaxMind DB #39

erbunao opened this issue Sep 26, 2019 · 2 comments

Comments

@erbunao
Copy link

erbunao commented Sep 26, 2019

The CSV pulled from MaxMind shows that several cities are available from Singapore. However those cities do not have a corresponding state which ended up excluded from the search list.

I was wondering if there are existing workarounds with this scenario. Is there a more future-proof way of dealing with a city without a state?

@loureirorg
Copy link
Collaborator

With version 0.1.0 (released yesterday), you can now add missing states by editing db/states-lookup.yml.

In the following example all cities with no corresponding state will be assigned to a new state named "Missing State":

SG:
  "": "Missing State"

You can also rename or add missing cities by editing db/cities-lookup.yml.

I am not sure this would fix the issue you are experiencing though, because it is a flaw on MaxMind database, but I am working on a new version of this gem that uses alternative sources. I am thinking to use OpenStreetMaps database but there are some technical difficulties in doing so - the OSM database size is about 40GB, so I am thinking to use GitHub Actions to process this database from time to time. Anyway, improvements are coming :)

PS: Sorry for the delayed reply.

@erbunao
Copy link
Author

erbunao commented Mar 27, 2020

That's no problem @loureirorg! Thanks for the update, I think this solves the problem at least for missing states.

@erbunao erbunao closed this as completed Mar 27, 2020
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

2 participants