Converts Google Takeout historical data for Google Maps from JSON to 2-column CSV with long/latitude
- Visit takeout.google.com
- Scroll down or search for 'Location History'
- Under 'Multiple File Types' ensure 'JSON' is selected
- Click through the next few steps, receive the email from Google (or directly download depending on file size), download the data
- Extract the .zip (etc) file to any location
- Have the folder setup something like the following:
C:\\MapProject\whatever you want as long as it leads to Location Historyetc- Check the
base_dirvariable and either change your files to my folder layout or change my code to yours, I don't care. - Do (or don't) this for all the other variables at the top
- Check the
- Make sure your python environment has the right packages installed. I really hope you know how to do that if you're reading this.
- Run the takeout.py script (or the fancy new takeout_gui.py!!)
- Do something cool with the data or don't
-
latlongdata.csv will almost definitely contain multiple of the same coordinate pairs. I did some looking into my own data and found that almost all the duplicate coordinates were either my place of work, my home, or friend's home. If you're making some sort of heatmap, this is probably the file you want to use.
-
latlongdata_no_duplicates removes any duplicate coordinate pairs. If you want to make a map of every county/state you've visited, this is probably the file you want to use.
- I will die if I have to make another version of this
- Add integration with my CSVMappy Project. Maybe make it run in one script, idk