SANKEY Experiment
This is a Sankey diagram that visualizes the flow of values between named nodes, with the source and target data loaded from an external CSV file. The diagram uses the `d3-sankey` extension library on top of d3.v6, with nodes rendered as colored rectangles and links as semi-transparent black paths with widths proportional to their values. The code explicitly formats numbers and applies a categorical color scheme using `d3.scaleOrdinal`, while interactive hover states on links increase their opacity. Rendered as SVG, the visualization includes node labels and tooltips via `title` elements.
AI-generated descriptionThis is a sankey diagram used as an example in the book D3 Tips and Tricks v6. It is based on a simpler version here.
It demonstrates the construction of a sankey diagram using d3.js from external csv data that is formatted using just link data and named values.