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
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
-shortenflag 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.
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
-plotallflag will produce a single map with a single LifePath for all the input data. City name labels are optional. Using the
-plotflag 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):
Animate the LifePath in a GIF: all the geodesic maps created using the
-plotflag can be combined into a GIF using the
-gifflag. The result looks like this (higher quality version on Imgur):
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 HERE.com'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):
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 - HERE.com'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 HERE.com 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.