SANKEY Experiment
A compact SANKEY diagram built with D3.js visualizes the flow of widgets between five named people (nodes) through seven links, each path’s thickness proportional to its value. The SVG renders node rectangles, draggable via `d3.behavior.drag`, with semi-transparent black links. Data loads from an external JSON file, which the code maps from named source/target strings to node references before applying the `d3.sankey` layout. Interactive relayout on drag updates link paths, while hover tooltips show source, target, and value.
AI-generated descriptionThis is a sankey diagram used as an example in the book D3 Tips and Tricks. It is based on a simpler version here.
It demonstrates the construction of a sankey diagram using d3.js from external JSON data that is formatted with node and link data using named values. It should be taken in context with the text of the book which can be downloaded for free from Leanpub.