
Sankey Diagram
Flow diagram where arrow widths are proportional to flow quantities.
Sample code / prompt
import plotly.graph_objects as go
# US Energy Flow Data (Quadrillion BTU)
sources = ['Coal', 'Natural Gas', 'Petroleum', 'Nuclear', 'Renewables']
source_values = [11, 32, 35, 8, 12]
transforms = ['Electricity Gen.', 'Direct Use', 'Rejected Energy']
end_uses = ['Residential', 'Commercial', 'Industrial', 'Transportation']
# Define flows: source -> transform/enduse
