Skip to main content
100%

SANKEY Experiment

✓ Published0🌍 Public
JJoePlant
Last edited Jan 4, 2017
Created on Jan 4, 2017

This Sankey diagram visualizes flows between named entities using d3.js v4, with data loaded from an external CSV file containing only source, target, and value columns. The chart uses the d3.sankey plugin to compute node positions and link thicknesses, rendering nodes as colored rectangles with labels and links as curved paths whose stroke width encodes flow magnitude. Hovering over a link or node reveals the exact quantity in "Widgets" via a tooltip. Nodes are draggable, and the layout dynamically recalculates link paths on drag. The example, based on D3 Tips and Tricks v4, demonstrates how to transform raw tabular CSV data into a Sankey diagram with minimal preprocessing, using d3.nest to deduplicate nodes and d3.drag for interactivity.

AI-generated description

This is a sankey diagram used as an example in the book D3 Tips and Tricks v4. 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.

forked from <a href='http://bl.ocks.org/d3noob/'>d3noob</a>'s block: <a href='http://bl.ocks.org/d3noob/06e72deea99e7b4859841f305f63ba85'>Sankey diagram using a csv file with v4</a>

mit Licensed

Similar vizzes