block by HarryStevens 5b0e19824232427c6272f0bab95b2dbf

Sankey from CSV II

Full Screen

Create a Sankey diagram from a CSV file. I got most of this code from d3noob’s block, but I added the code to convert the CSV data into the format required by d3-sankey.

Unlike version 1, this version colors the links according to the source.

index.html

data.csv

sankey.js