SANKEY Experiment
This sankey diagram visualizes the flow of case dispositions in a police department, using external CSV data with named source and target values. The chart displays the distribution of cases from "This year" and "Last year" into a "Total" node, then onward into outcomes like "Final Report" and further subcategories such as "True but insufficient Evidence," "False," and "Mistake of Fact." Node rectangles are colored using a categorical scale, links are sized by flow value, and both nodes and links include hover tooltips. Built with D3 v3 and SVG, the visualization supports interactive dragging of nodes to rearrange the flow layout dynamically. Data is loaded from an external CSV file, and the sankey layout is computed with custom code from the D3 Tips and Tricks book.
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 csv data that is formatted using just link data and named values. It should be taken in context with the text of the book which can be downloaded for free from Leanpub.
forked from <a href='http://bl.ocks.org/d3noob/'>d3noob</a>'s block: <a href='http://bl.ocks.org/d3noob/c9b90689c1438f57d649'>Sankey from csv with d3.js</a>