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!

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

  1. Hi Bryan,

    I stumbled across your code on Github and just wanted to thank you for it and the easy to follow instructions. Exactly what I was needing for an upcoming company project. God I love Python.

    -Jeff

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>