Python code for performing reverse address lookups using longitude and latitude (uses free Nominatim OSM/Mapquest databases)

In my last Kaggle contest (read about it here), I created a small utility in python for performing reverse lookup of address data (zipcode, neighborhood, stree, etc.) using longitude and latitude fed to the free Nominatim OSM/Mapquest databases.  This is a better option then the Google Maps API for bulk data geo lookups because it has no daily limit on calls, whereas the Google Maps API (free version) has a 5000 call daily limit.

With the contest completed, I’ve had a little free time, so I thought I would clean up the code a bit and release it publicly in case it might be of use to anyone else on a future Kaggle contest or other data science project.  So here it is:  https://github.com/theusual/reverse_geocoding_nominatim

It’s easy to use: the input can be any flatfile with longitude and latitude fields,  then it returns street address, zip code, neighborhood, and city/township.  It could be easily changed to also pull country, state, country, country code.

Nothing fancy, but hopefully this may be of help to someone in the future!