hey lady, where’d you get that treemap?

If you’re on twitter and feel as though you are “muddling through” like I feel most of the time, you’ll understand what a gift it is when someone sends you a really cool tweet.  Here’s the one I got today from @shelkster:

“What Processing code did you use for the treemap? Been exploring various examples. This is a great use of the strip treemap.”

Well, first of all, thanks!  Second of all, I have a confession to make.  The treemap itself is not from Processing. It’s from Treemap 4.1 which is software created at the University of Maryland in their HCIL lab.  What I did write in the Processing IDE was the code that parsed out all of the values. This would have been slightly easier had I just done it Eclipse, but for some reason, I was very curious about using the Processing IDE for this task.  There’s 99% chance I’ll be moving that from Processing into a Java class.

A few weeks ago, I worked through the treemap chapter in Ben Fry’s Visualizing Data“>Visualizing Data and came up with this map of the files on my computer.  (Keep clicking and you’ll get a good view of it)

Processing Treemap of My Files

This one is squarified and has the style of this treemap of the news. So if you have that book, Visualizing Data, this is where you will end up.  The reason I have initally chucked the data into Treemap 4.1 instead of the processing treemap has to do with the data format and configurability.  Treemap 4.1 uses the tm3 format which is basically a tab delimited file.  Ben Fry’s treemap example is “processing” files using java’s ability to search through a file system.  Treemap 4.1 also allows an exploration of data through its user interface.

My post, at this point, might sound like an ad for Treemap 4.1, but I’d like to point out, that it’s only supposed to be used for research and not for commercial purposes.  Maryland’s HCIL lab seems connected to a business group that sells this type of software for extremely large sums of money that I certainly can’t afford.  The tests that I visualized are from Mozilla, and I used this as part of my thesis work. If it weren’t for the ability to configure the treemap from the user interface, I wouldn’t have used Treemap 4.1, I would have used JTreemap. From twittering with the writer @benoitx, I know that it is still being maintained. If you just want to see data in a treemap and want it to be as simple as possible, this is a good choice.

Since I now have the data file I need, my next step is using the Treemap api released under the Mozilla public license to render the Mozilla tests in Processing’s treemap.   I think I remember from my previous digging around, that it supports several layouts including strip.

Probably more than you wanted to know, but uh…it’s my blog.  And thanks for the tweet. It really made my day.

3 thoughts on “hey lady, where’d you get that treemap?”

  1. Marlena,

    If you’re using it for your masters thesis, we may be able to give you a free copy of Heat Map Explorer, which is a commercial tree map program unrelated to University of Maryland. We support both squarified and strip layouts, as well as a bar layout (and about 6 more layouts in the upcoming version next month). Data is read directly from an Excel spreadsheet or any database, so no need to get it into a custom format. There’s also an SDK you can use to tweak the user interface using XML. You can download a copy via http://www.labescape.com/products/explorer/hme-desktop.html .

    If you decide to download, put “Masters thesis – Trevor recommended on blog” in the comments so we know to treat you special. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *