A test block to experiment with building hierarchies from flat files. Pretty messy at the moment.
The flatToHierarchy()
function transforms a flat and wide table into a hierarchy based on a sequence of field names. Adapted from this Stack Overflow answer.
https://d3js.org/d3.v4.min.js
https://d3js.org/d3.v4.min.js