I have a csv data file which looks like this
root,y,i,5 root,c,b,a,7 root,c,b,z,2
I\'d like to generate something similar to the flare.json data file like
I would use the d3 nest function to accomplish this. You can find documentation on how to use it here: http://bl.ocks.org/phoebebright/raw/3176159/
The solution would look something like this:
var nested_data = d3.nest()
.key(function(d) { return d[0]; })
.key(function(d) { return d[1]; })
.entries(csv_data);