Public
Edited
Apr 25, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
nameOfDataTable@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
nameOfChart = SankeyChart({
links: nameOfDataTable
}, {
nodeGroup: d => d.id.split(/\W/)[1], // take second word for color
nodeAlign, // e.g., d3.sankeyJustify; set by input above
linkColor, // e.g., "source" or "target"; set by input above

// you can copy this code, but make sure to change the DATALABEL so to match what your data describes
format: (f => d => `${f(d)} DATALABEL`)(d3.format(",.1~f")),
width,
height: 500,
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more