{"id":1703,"date":"2011-05-08T14:27:52","date_gmt":"2011-05-08T14:27:52","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=1703"},"modified":"2011-05-08T14:27:52","modified_gmt":"2011-05-08T14:27:52","slug":"your-google-latitude-history-as-a-heatmap","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=1703","title":{"rendered":"Your Google Latitude history as a heatmap"},"content":{"rendered":"<p><strong>Overview<\/strong> <\/p>\n<p>I made a web tool that draws a heatmap to show where you&#8217;ve been if you upload your history file from Google Latitude.  <\/p>\n<p><strong>What I made<\/strong> <\/p>\n<p>See a heatmap of where I&#8217;ve spent the most time at <a href=\"http:\/\/heatmapforlatitude.appspot.com\/static\/latitude-dalelane.html\">heatmapforlatitude.appspot.com<\/a>. <\/p>\n<p>If you like it, you can upload a Latitude history file and make a heatmap of your own.  <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/heatmapforlatitude.appspot.com\/static\/heatmap.png\" hspace=\"20\" vspace=\"10\" style=\"border: thin black solid\"\/><\/p>\n<p><!--more--><strong>I&#8217;ve done this sort of thing before&#8230;<\/strong> <\/p>\n<p><a href=\"http:\/\/dalelane.co.uk\/blog\/?p=1325\">About a year ago<\/a>, I noticed that the new <a href=\"https:\/\/www.google.com\/latitude\/b\/0\/history\/manage\">Google Latitude dashboard<\/a> had a way to export your history &#8211; it let you download a KML file containing locations that Google Latitude has captured you at.  <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/heatmapforlatitude.appspot.com\/static\/heatmap1.png\" hspace=\"10\" vspace=\"5\" align=\"left\" style=\"border: thin black solid\"\/>Any new source of data is always worth playing with, so I hacked together something to generate a heatmap to show where I spend most of my time.  <\/p>\n<p>It was a Python script that generated a PNG picture of a heatmap, and a small KML file that said where to put the graphic when overlaying it on a map.  <\/p>\n<p>Then I put the picture and the KML files on my public dropbox space, and used the (quite nifty) feature of Google Maps that if you put the URL of a KML file in the search box, it overlays the contents on the map. <\/p>\n<p>Hey presto, instant maps mash-up.  <\/p>\n<p>It was quick-and-dirty and kinda kludgy, but more or less worked, and I got some <a href=\"http:\/\/www.flickr.com\/photos\/dalelane\/sets\/72157624156114094\/\">pretty heatmap pictures<\/a> out of it.   <\/p>\n<p>It needed some trial-and-error tuning &#8211; stuff like the radius of the heatmap blobs, and so on &#8211; which I put in a bunch of variables at the top of the script and <a href=\"http:\/\/dalelane.co.uk\/blog\/?p=1325\" >put the script on my blog<\/a> in case anyone wanted to try it for themselves. <\/p>\n<p><strong>What I did today<\/strong> <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/heatmapforlatitude.appspot.com\/static\/heatmap2.png\" hspace=\"10\" vspace=\"5\" align=\"right\" style=\"border: thin black solid\"\/>On Friday, I was looking around for ways to do a heatmap for something at work when I came across some heatmaps by <a class=\"external\" href=\"http:\/\/bjoern.hoehrmann.de\/\" target=\"_blank\">Bj&#246;rn H&#246;hrmann<\/a>. <\/p>\n<p>He wrote a <a href=\"http:\/\/www.websitedev.de\/temp\/openlayers-heatmap-layer.html\">heatmap layer for OpenLayers<\/a> using the HTML5 canvas tag.  <\/p>\n<p>Any excuse to play with HTML5 stuff is always good, and I already had code from last year to parse the Latitude history files.  <\/p>\n<p>Doing it in JavaScript also meant it could be interactive. Instead of making stuff like the blob radius a script variable (run the script, upload the KML, look at it in Google Maps, tweak the script, run the script, etc&#8230;) I could use slider controls to play with the heatmap interactively.<\/p>\n<p>It looked neat, so today I modified my old script to work with Bj&#246;rn&#8217;s heatmap layer. <\/p>\n<p>The other problem with my old script was that people needed to know how to run a Python script to try it for themselves. While I was at it, I wrapped the Python in some Google App Engine code and put it online, so people could run the parsing code from the browser, too.  <\/p>\n<p><strong>Give it a try<\/strong> <\/p>\n<p>I&#8217;ve put it at <a href=\"http:\/\/heatmapforlatitude.appspot.com\/static\/latitude-dalelane.html\">heatmapforlatitude.appspot.com<\/a> so people can have a play. <\/p>\n<p>Even if you don&#8217;t use Latitude, I&#8217;ve put my history up there as a demo, so you can always just give that a try.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview I made a web tool that draws a heatmap to show where you&#8217;ve been if you upload your history file from Google Latitude. What I made See a heatmap of where I&#8217;ve spent the most time at heatmapforlatitude.appspot.com. If you like it, you can upload a Latitude history file and make a heatmap of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[231,388,492,387],"class_list":["post-1703","post","type-post","status-publish","format-standard","hentry","category-code","tag-google-app-engine","tag-google-latitude","tag-heatmap","tag-latitude"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1703"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1703\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}