Posts tagged ‘visualisation’

Applying weighting to heatmaps

Heatmap with weighting applied

Following up on the playing around I was having with heatmaps the other day, I made a few updates to the heatmap.py script to allow for each point to have an associated ‘intensity’. When the points are plotted, the intensities are normalised and each point plotted with a relative intensity (as shown in the image on the right).
Few other little changes I made:

  • allow the area covered by the size of the final image to be specified, rather than using the max & min x/y coordinates from the input points
  • change how the the dots are built – in theory should be a little quicker – but I’ve not tested with large enough dataset to know if it makes a big difference
  • in my demo script I’ve shown how you can convert the latitude to its Mercartor projection coordinate

For those interested in the changes I made to the heatmap.py script you can download the diff and an example script. Any feedback, comments welcome 🙂

Time for Timelines

A couple of weeks ago, Peter (one of the OU graphic designers) asked me if Cohere could produce nice graphical timelines (the BBC has some really nice ones). He’s been tasked to produce one for one of the OpenLearn courses and was thinking about the best way to do it – and so it could be replicated easily (when he gets asked to make another one for another course). Peter pointed me at Simile from MIT – which is a kind of Google Maps API for timelines.

My response was that Cohere couldn’t currently provide exactly what he was looking for (we’ve not really worked on many different visualisations yet), however, you could use Cohere as the repository for providing data (via the Cohere API) to Simile. All we’d need to do would be add the facility to add a date to an idea/node, and another formatting output options to get the data in the way that Simile requires. (Note to self: should also add location option for ideas/nodes so they could be displayed on a Google Map as another visualisation option for Cohere)

Yesterday I had a go with this on my Cohere development server, so can now add dates to nodes and export in the correct format for Simile. I also created a little script so that I can show my blog postings on a Simile timeline:

This timeline is dynamically generated and shows the last 100 of my blog postings. If you’d like to have a look at the script I’ve used for generating this, then you can download it. Depending on where you post it up (relative to your WordPress installation), you may need to slightly alter line (no. 14) to point to your wp-config.php file.

The main downside that I’ve found so far with Simile is that is will only allow data to be dynamically loaded via XMLHttpRequest. This means that the data source must reside on the same domain as the page you’re displaying the timeline on (unless you can use a iframe as I have done above) – it would be fantastic if Similie could also accept data via JSON and so avoid the cross-domain problem (I’ll need to check whether this has already been added as new feature request in their issue tracker).

Then completely coincidentally, this morning I saw this post from Stuart about Dipity – an online timeline creator. So I’ve had a very quick play with it this morning – creating the following timeline (also of my blog):

This took about 30 seconds to produce, buy just adding the URL of my blog feed.

These two timelines, although displaying the same data, are obviously quite different with Dipity is far more graphical, though IMHO a bit cluttered and not so easy to read. Simile looks quite grey in comparission, though I’ve not yet explored the API fully and how you can customise the colours/display. Dipity is much quicker to get up and running with, but my feeling is that Simile would offer more flexibility (within bounds), for example I can’t tell yet if Dipity has the capability to show events which span a period of time (i.e. have start and end dates – as Simile allows).

(Looking at Dipity has reminded me that we should create an RSS feed for Cohere nodes).

Any pointers to other timeline visualisations appreciated 🙂