Suppose you have a list of addresses and want to connect them with some kind of location-based information. For example, your addresses might scatter across several neighborhoods and you want to find out to which neighborhood each address belongs, because you have further information (like mean income, percentage of migrants, etc.) about each neighborhood and want to combine it with your data. In many countries, administrative authorities gather such geographical information and provide the data on their websites.
In the given scenario, three steps are necessary in order to combine the addresses with geographical information:
- Geocoding the address, i.e. finding out the geographical coordinates (latitude, longitude) for this address
- Given a file with geographical information (GIS data) that form several distinct areas as polygons, finding out which of these polygons contains the geocoded address
- Obtain necessary information such as a neighborhood identifier from the polygon
This short post shows how to do that with the Python packages googlemaps and GDAL.
Read More →
Recent Comments