Introduction
Have you ever wanted to know the Latitude & Longitude of your home? If yes, then I am really excited to share this with you folks. You can not only find the Latitude & Longitude of your home but also a tonnes of locations together!!
This is slow though. Requires patience 😀!
How to use this
This is based on Python 3.
- Clone or download this repository.
- Run
pip install -r requirements.txt
. - Save your list of addresses in
data.csv
inCity
&Country
columns. You can change it according to your needs. - Voila it gets out in
LatLong.csv
.
Notes
- Used
geopy
for getting theLatitude
&Longitude
. - Used
unidecode
for changing accented characters. For example, the locations mentioned in mydata.csv
file are from Costa Rica and they have a lot of accented characters in the city names. - Created a function
do_geocode
to handle Geocoder Timed Out Error. Don't forget to import GeocoderTimedOut using thisfrom geopy.exc import GeocoderTimedOut
. - Used
pandas
forDataFrame
operations. data.csv
is the example of input file.LatLong.csv
is the example of the output file.
Have Fun ! 😄