mages / googleVis

Interface between R and the Google Chart Tools
https://mages.github.io/googleVis/
360 stars 155 forks source link

Add support for treemap objects #26

Open Quiri opened 9 years ago

Quiri commented 9 years ago

d3tree has awesome support for treemap objects, so you can have the data quickly in the right format for visualization. Maybe it's interesting to add it here. I can try to do so

mages commented 9 years ago

Hi Kirill, googleVis focuses on the Google Chart Tools API, which comes with a treemap function, see gvisTreeMap. Are you talking about a helper function for reshaping data, rather than the plotting function?

Quiri commented 9 years ago

Hey Markus, I know and I used the gvisTreeMap myself in a recent analysis. But i think that the preparing of the data into the right format is a pain. I stumbled upon the d3tree package and their elegant solution to use the treemap object as the data argument. So all other arguments are fed from this object.

I my code (2 stage treemap) it would reduce my code from 20 to 2 lines.

mages commented 9 years ago

Ok, I see. Show me your code. Either here, or perhaps in a blog post of yours?