<embed height="0" id="_plugin_d462f475-c18e-46be-bd10-327458d045bd" type="application/thunder_download_plugin" width="0"/>cool!
Heatmap is a good way to visualize data and I know how to build a static one with R. I'm wondering if there is any tools out there that allows you to make a interactive heatmap where if you mouse over a heatmap block, the corresponding values (or other attributes) will show up etc?
Thanks!
4 answers
I wrote a blog post about this a while back using d3.js: http://blog.nextgenetics.net/?e=44
The demo is here: http://blog.nextgenetics.net/demo/entry0044/
That's pretty neat, and looks much better than any d3-based approach I've tried and seen. I'd have a few suggestions:
- Enable the export of a text file of cluster features, given the choice of distance metric, linkage method and cluster leaf subset
- Perhaps use R for back-end clustering, or write a library for R to export the JSON data used as input to your rendering code (this would make it more usable as a web service)
- Publish source on Github or Bitbucket
You could write up an interactive heatmap with d3.js.
Attach a mouseover event handler to each svg:rect element that looks up the value used to generate the cell's color intensity. The handler sets the value of a div somewhere else on the page (or even in a popup, if you want to get fancy).
I sketched up something similar here to explore some design ideas (it's basically a two-color heatmap — easy enough to map to a range of colors using the d3 API), if you want to look at some sample code. It is not a finished product and is far from perfect Javascript, but it might give you something to think about.
Log in to answer this question.