I am working on creating a Treemap from a csv file.
The data in the csv file is hierarchical, as a result I used d3.nest().
However, the resulting JSON
Hey guys I think I found a fairly simple solution. I accomplished a very nice nesting of a large dataset (400,000 rows) for a hierarchical bar chart in a very streamline way. It utilizes the Underscore library and an additional function _.nest. Simply download and include the two libraries necessary
"underscore-min.js" "underscore.nest.js"
Then use the _.nest function to create your structure. Here's my line:
var newdata = _.nest(data, ["Material", "StudyName"]);
"Material" and "StudyName" are the columns I want to group my structure to.
There are other options to use this function if you need to accomplish more things but I will leave it like this