The Heatmap of My Life

Peter Rukavina

Google Maps for Android has a feature that has been alternatively referred to as “Latitude” “Location History” and “Timeline” that allows me to drop a constant stream of digital breadcrumbs marking my location and to then explore that on a map.

I’ve been dropping these breadcrumbs, off and on, for 8 years, so I have a lot of data accumulated: 1.3 million breadcrumbs in total, from January 15, 2010 until today.

Visiting Google’s “Your Timeline” page in a desktop browser allows for some basic visualization and analytics for this data; here’s what my vagabonding looks like:

My Google Location History, 2010 to 2018

This is an incomplete picture of my travels because I haven’t always had an Google Maps-capable phone in my pocket and, even when I have, I haven’t always had a data plan that would allow me to gather the data. This is why you don’t see any markers in Ukraine, for example: I was carrying an old Nokia N95 on my trip there in 2012.

Google Maps also attempts to auto-correlate my travels to points of interest where I’ve stopped along the way. It’s recorded 887 of these over the years, and the same high-level overview reports on the top 10 places I’ve visited:

  1. 100 Prince Street (my house)
  2. The Guild (my office for 7 years)
  3. Charlottetown Farmer’s Market
  4. Colonel Gray Senior High School
  5. Mad Wok
  6. Sobeys
  7. Receiver Coffee
  8. Casa Mia Café
  9. Birchwood Intermediate School
  10. Queen Elizabeth Hospital

That’s my life pretty well in a nutshell.

Google’s “takeout” service allows me to export all 1.3 million geolocations into a JSON file that I can then use outside of Google Maps. And, indeed, there’s more than just geolocations in the file, as Google Maps is not only tracking nodes on the graph of my life, but edges too. For example, here’s a slice of my Friday:

{
  "locations" : [ {
    "timestampMs" : "1527896063946",
    "latitudeE7" : 462356055,
    "longitudeE7" : -631246024,
    "accuracy" : 16,
    "altitude" : -15,
    "verticalAccuracy" : 2
  }, {
    "timestampMs" : "1527896058549",
    "latitudeE7" : 462357912,
    "longitudeE7" : -631240912,
    "accuracy" : 17,
    "altitude" : -17,
    "verticalAccuracy" : 3
  }, {
    "timestampMs" : "1527895978334",
    "latitudeE7" : 462357912,
    "longitudeE7" : -631240912,
    "accuracy" : 17,
    "altitude" : -17,
    "verticalAccuracy" : 3
  }, {
    "timestampMs" : "1527895916802",
    "latitudeE7" : 462357912,
    "longitudeE7" : -631240912,
    "accuracy" : 17,
    "altitude" : -17,
    "verticalAccuracy" : 3,
    "activity" : [ {
      "timestampMs" : "1527895917135",
      "activity" : [ {
        "type" : "STILL",
        "confidence" : 100
      } ]
    } ]
  }
}

The timestamps are in milliseconds, can can be converted into human readable dates with converters like this one, which tells me that that timestamps in this slice are:

  • Fri Jun 01 2018 20:34:23
  • Fri Jun 01 2018 20:34:18
  • Fri Jun 01 2018 20:32:58
  • Fri Jun 01 2018 20:31:56

From these timestamps, Google deduced that I was “STILL” during this period. Which, indeed, I was, as I was sitting here at my office desk typing away.

Other data points are more exciting, like this one from Friday afternoon:

{
	"timestampMs": "1527874663966",
	"latitudeE7": 462356055,
	"longitudeE7": -631246024,
	"accuracy": 16,
	"altitude": -15,
	"verticalAccuracy": 2,
	"activity": [{
			"timestampMs": "1527874645435",
			"activity": [{
				"type": "TILTING",
				"confidence": 100
			}]
		},
		{
			"timestampMs": "1527874659795",
			"activity": [{
				"type": "ON_FOOT",
				"confidence": 31
			}, {
				"type": "UNKNOWN",
				"confidence": 31
			}, {
				"type": "WALKING",
				"confidence": 31
			}, {
				"type": "IN_VEHICLE",
				"confidence": 8
			}, {
				"type": "ON_BICYCLE",
				"confidence": 8
			}, {
				"type": "STILL",
				"confidence": 8
			}, {
				"type": "RUNNING",
				"confidence": 8
			}, {
				"type": "IN_ROAD_VEHICLE",
				"confidence": 8
			}, {
				"type": "IN_RAIL_VEHICLE",
				"confidence": 8
			}, {
				"type": "UNKNOWN",
				"confidence": 4
			}, {
				"type": "UNKNOWN",
				"confidence": 4
			}]
		}
	]
}

This tells me that on Friday afternoon at 2:37 p.m., Google Maps deduces with 100% confidence that I was “TILTING” (I haven’t been able to find a definition for this, but it might mean my phone was in my hand, tilted) at location 46.2356055, -63.1246024, and that I was, with 31% confidence, engaged in a foot, walking, and/or unknown activity at the time. Looking at the Google Maps rendering of my Friday afternoon, it looks like this was the return to work from coffee with a friend at Leonhard’s and the removal from my bag of my phone to plug it in.

Moving from the detailed to the broad overview, there’s a handy open source tool called location-history-visualizer that allows a higher level exploration of the complete data set: operating entirely in the browser, it accepts the Google Takeout JSON file of location history, post-processes it, and then visualizes it on a map at any scale. I had a lot of fun exploring this map, and grabbed several screen shots showing the heatmap of my life at different levels.

Here’s Charlottetown, to start with. This heat map shows 8 years of my rambles around the city:

Charlottetown Heat Map

Moving outward, here’s Prince Edward Island over the same period:

PEI Heat Map

Outward from PEI to Atlantic Canada:

Atlantic Canada Heat Map

Here’s eastern North America, which shows my frequent travels to Boston and southern New Hampshire, to family in Montreal and Ontario and Napanee, as well as a week spent in a cottage in Maine:

Eastern North America heat map

My European travels are not well-represented in the data, both because a lot that travel happened pre-2010, and because I didn’t always have data coverage on my more recent trips:

Europe heat map

Finally, a global view, a view that, like Google’s own, shows clearly that my travels haven’t taken out out a 25 degree band of latitudes running from 35ºN (Tokyo) to 60ºN (Oslo). I’ve not been anywhere near south of the equator, nor anywhere east between Croatia and Japan:

Earth heat map

Truth be told, I have been further south (to Florida, 28ºN) and further east (to Kiev, 30ºE), but didn’t drop digital breadcrumbs there.

Squirreled away on my computer I have a richer collection of geolocation data gathered from other sources–Flickr, Foursquare, Here, Plazes and Twitter–running from 2004 to the present. I’ve long thought it would be an interesting project to come of with a way to convert all of that data into a common format to allow me to view it in aggregate; this incomplete slice of my heatmap through Google’s eyes might be the inspiration I need to finally do that.

Comments

Submitted by Andrew on

Permalink

This is cool! I've been compiling a list of postal and zip codes of people who order a product from my brother's online business. Do you think I could do something like this using postal and zips, rather than the GPS cords? We have a theory that, over time, we should be able to start seeing a "Jones Effect" take place with the product. Any thoughts on how I could achieve this?

Two things you need to do:

  1. Geocode your ZIP and postal codes. You can do this with the Google Geocoding API, which gives you 40,000 lookups for free every month. The result will be a lat/lon pair for every customer.
  2. Convert your cloud of lat/lon pairs into a heat map. Google Maps has an API for that, but there’s also Leaflet.heat, which is what the visualizer that I used uses under the hood.

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search