Visualizing Your Google Location History

Ryan Villanueva
3 min readOct 18, 2017

--

This post is a part of my Weekly Make series, where every seven days I force myself to create something and put it out in the wild for you to gawk at.

I’ve known for awhile that Google tracks my every move. But only after I downloaded the data did I fully realize how frequently they received data and its incredible precision. And when you replay it on a map, it’s absolutely fascinating.

For those less technical or just want to see a static view of where you’ve been, you can go to your Google Maps Timeline. If you want the full time-series visualization, here’s how.

Step 1: Download your Google Location History

Go to your Google Settings and download your Location History in JSON format. I’d only select Location History for now — the rest of your data is likely gigantic.

Step 2: Parse it into a .csv file

This might be tricky for non-coders. Google outputs your data in a non-standard schema, so here’s a Python 3 script to parse the JSON file to a csv with a UTC timestamp, latitude, and longitude.

Download it and run it with the path to your Location History.

python index.py --input path/to/your/file.json --output /path/to/output/file.csv

Step 3: Upload it to CARTO

Go to https://carto.com/ and set up a free account. Keep in mind this will make your data publicly available. If you’re understandably uncomfortable with that out in the open, there’s a two week free trial that allows you to keep your data private.

Upload your newly created csv as a new dataset.

Check out the timestamp — minute by minute location!

Click “Create Map”.

Step 4: Set up the time-series visualization

Once you get to your map, select your data layer. On the Style tab under Aggregation, select “Animated”. Make sure Column is set to “timestamp”.

And that’s it! Press play to run the visualization.

Look at how accurate those locations are!

Despite my excitement for rich and detailed location data, there are definitely privacy implications. If you’d like to reduce your data footprint, take a look at how to clear and disable Location History. But in the larger picture, you often have to make a privacy and value tradeoff. By understanding what data is being collected and where to find it, you set yourself up to make an informed decision. Bonus points if you do something cool with your data before you flip the opt-out switch.

Thanks so much for reading! If you enjoyed, feel free to follow me and hold down the Applause button. Stay tuned for the next Weekly Make!

--

--