Published
Edited
Jun 10, 2020
Insert cell
Insert cell
sankeyChart(data)
Insert cell
data = {
return {
nodes: [ {name: "Agricultural 'waste'", category: "Agricultural"}, {name: "Bio-conversion", category: "Bio-conversion"},{name: "Liquid", category: "Liquid"},{name: "Losses", category: "Losses"},
{name: "Solid", category: "Solid"},
{name: "Gas", category: "Gas"},
{name: "Biomass imports", category: "Biomass"},
{name: "Coal imports", category: "Coal"},
{name: "Biofuel imports", category: "Biofuel"}],
links: [ {source: "Biofuel imports", target: "Bio-conversion", value: 4}, {source: "Bio-conversion", target: "Liquid", value: 2}, {source: "Bio-conversion", target: "Losses", value: 26.862},
{source: "Bio-conversion", target: "Solid", value: 280.322},
{source: "Bio-conversion", target: "Gas", value: 81.144},
{source: "Biofuel imports", target: "Liquid", value: 35},
{source: "Biofuel imports", target: "Solid", value: 35}],
units: "Instances"
}
}
Insert cell
import {sankeyChart} from "@anandcsingh/sankey-diagram"
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