I realised I've carried a smartphone since 2011 so my location history was pretty reliably captured since then. You can download this from Google but it's just a block of coordinates in KML, so I wanted a visualisation. I thought a single unbroken line would be an elegant way to see where I'd been, like a wake or trail of footprints.

What it does

  1. Shorten the list of locations: Google allows you to "checkout" your full location history as KML. For me, this resulted in over 450,000 pairs of latitudes and longitudes. Most of these were very close together (e.g. home, office, supermarket, repeated ad nauseum). Running LifePath with the -shorten flag will tidy up the huge KML file that Google gives you and reduce it to locations separated by at least 100km. For me, that stripped it down to just over 200 locations.

  2. Plot geodesics between all those points: a geodesic is the path of minimum distance across a curved surface (hence on flat map projections, flight paths appear curved). Using the -plotall flag will produce a single map with a single LifePath for all the input data. City name labels are optional. Using the -plot flag will produce a folder of images with each additional geodesic (which can then be combined into a GIF). This is what the combined LifePath looks like (higher quality version on Imgur): Alt Text

  3. Animate the LifePath in a GIF: all the geodesic maps created using the -plot flag can be combined into a GIF using the -gif flag. The result looks like this (higher quality version on Imgur):

Devpost-compressed GIF

How I built it

Once I had the first basic LifePath I realised I wanted to add some meaningful labels, but Google's data only contains geocoordinates. This is where's API came in. I used their reverse geocoding API to extract the city names of some well-separated points, then passed those to my plotting routine to add labels (higher quality version on Imgur): Alt Text

Challenges I ran into

Manually adding a bunch of coordinates from 10-20 family holidays before I had a smartphone took longer than I thought it would. However, in the end I think it's worth it to see my entire LifePath traced from birth, including childhood travel.

Accomplishments that I'm proud of

Implementing the labels in a couple of hours flat -'s API was much simpler to implement than I expected.

What I learned

I learned how to handle JSON data, as that was the format the API supplied its results in.

What's next for LifePath

Interactivity. Rather than a static image, it would be nice to be able to zoom in and click on locations to see the dates when I was there.

Built With

Share this project: