Location History

Since around 2012, I've had a phone that keeps track of my location whenever it's on, using Google's Location History. When I first started writing this software, I wanted to see where I had visited in the UK and where I most frequently was. I decided that the best way to represent this was to use a heat-map. I then turned this into a web service so that I can more easily update the images.

Data Facets:

You can find the code in its repository on GitHub, location-history.

Here's a quick (relatively high level) how-to on turning your data into a heatmap:

  1. Retrieve your data from Google
  2. Load the data from the file
  3. Strip out the most inaccurate points
  4. Convert the data to a more useable coordinate system
  5. Convert the data to a more efficient data structure, like a Quadtree - perhaps the most fun part of the process
  6. Create a heatmap array (number of points within each (x,y) of the viewport) from a viewport (scale, center point, and dimensions of the projection) - another fun part
  7. Create a painter for the heatmap (defines color, pixel size and writes the data to some sort of canvas)
  8. Save the image to file