Treemap on Rails

Andy Bruno, who developed the treemap code that we use for our Bookscan data visualizations, has created a new Rails implementation called acts_as_treemap, according to a report by Rob Orsini, author of The Rails Cookbook, who blogs on Rails-related topics at tupleshop.com.

If you’re a fan of data visualization, as I am, you’ll be excited both about getting your hands on Andy’s Ruby treemap code and on Rob’s clear description of how it works. And heck, Andy even applied it to an example data set that is fascinating in and of itself: SourceForge projects.

Here’s the resulting treemap view:

SourceForge Treemap

This visualization uses the SourceForge project name for labeling each region of the treemap; the size of each region is be based on the number of downloads for the current month, and the color of each region conveys information about the rate of change in the number of downloads for each project. While the color-scheme is a bit different than we use for the book visualizations, green means up, red means down, and the paler colors are in-between. There’s a bit of overlaid information about categories, but the treemap doesn’t really organize the downloads by category like we do with book sales. But it’s still pretty interesting to pick out the biggest downloads.

And what’s more, if you like this kind of visualization, Andy and Rob have now made it easy for you to apply it to your own data sets.

tags: