All examples By author By category About

emc5ud

collapsible sankey tree

This is an example on how to build a collapsible Sankey tree with 2 children per node. The underlying structure of the tree is handled with d3.layout.tree(). My goal with this project was to provide a tool that could visualize the "flow" of data through braches of a tree similar to a Sankey diagram. If there is enough interest, I could generalize this code so that it can handle multiple children per node.

The example json file used came from a decision tree I made in R to predict the legitimacy German banknotes. There were more nodes in the actual decision tree, but the tree was heavily pruned for this visual demonstation.