I made a web tool that draws a heatmap to show where you’ve been if you upload your history file from Google Latitude.
What I made
See a heatmap of where I’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 your own.
I’ve done this sort of thing before…
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.
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.
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.
Hey presto, instant maps mash-up.
It was quick-and-dirty and kinda kludgy, but more or less worked, and I got some pretty heatmap pictures out of it.
It needed some trial-and-error tuning – stuff like the radius of the heatmap blobs, and so on – which I put in a bunch of variables at the top of the script and put the script on my blog in case anyone wanted to try it for themselves.
What I did today
On Friday, I was looking around for ways to do a heatmap for something at work when I came across some heatmaps by Björn Höhrmann.
He wrote a heatmap layer for OpenLayers using the HTML5 canvas tag.
Any excuse to play with HTML5 stuff is always good, and I already had code from last year to parse the Latitude history files.
It looked neat, so today I modified my old script to work with Björn’s heatmap layer.
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.
Give it a try
I’ve put it at heatmapforlatitude.appspot.com so people can have a play.
Even if you don’t use Latitude, I’ve put my history up there as a demo, so you can always just give that a try.