Energy Sankey#

Download this notebook from GitHub (right-click to download).


import pandas as pd
import holoviews as hv

hv.extension('bokeh')

Declare data#

edges = pd.read_csv('../../../assets/energy.csv')
edges.head(5)
source target value
0 Agricultural 'waste' Bio-conversion 124.729
1 Bio-conversion Liquid 0.597
2 Bio-conversion Losses 26.862
3 Bio-conversion Solid 280.322
4 Bio-conversion Gas 81.144

Plot#

sankey = hv.Sankey(edges, label='Energy Diagram')
sankey.opts(label_position='left', edge_color='target', node_color='index', cmap='tab20')
This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.

Download this notebook from GitHub (right-click to download).