pgeocode
pgeocode copied to clipboard
Support for partial matching of zip codes
Would it be an option to add support for partial zip code matching? When auto-completing a user input, it might be nice to already show available options even if only 3 out of 5 digits were entered, for instance.
Internally it's a pandas dataframe. You can probably do something like,
nomi = pgeocode.Nominatim(country)
mask = nomi._data['postal_code'].str.startswith(prefix)
res = nomi._data[mask]
if you wanted to do this.
I'm less sure about adding an API for this though as it's fairly a niche use case.