Best Data Viz
Flow

Sankey Diagram

Shows flows between nodes using bands whose width encodes quantity, revealing how resources move through a system.

Energy Flow by Source

How energy moves from generation to consumption

View data (8 rows)
Chart data table: Energy Flow by Source
valuesourcetarget
40CoalElectricity
25GasElectricity
15GasHeating
10SolarElectricity
35ElectricityResidential
30ElectricityIndustrial
10ElectricityLosses
15HeatingResidential
Make a sankey diagram with your data

Use a sankey diagram when…

  • Visualizing energy, material, or money flows between stages
  • Showing how inputs split and merge into outputs

Avoid when…

  • When flows are cyclical (Sankey requires directed acyclic layout)
  • When there are too many nodes creating visual clutter
  • When precise comparison of small flows matters (a bar chart of values is sharper)

Data it needs

PropertyValue
Min Rows4
Min Columns3
Column Types
stringstringnumber
NotesRequires source, target, and value columns.

Visual anatomy

Marks
linkrectangle
Channels
width (flow value)color (source or category)vertical position
Axes
horizontal: stages

Guiding principles

Consider instead

Common mistakes

  • Including too many small flows that obscure the main story

  • Not ordering nodes to minimize link crossings

History

Named after Captain Matthew Sankey who used them in 1898 to show steam engine energy efficiency; Charles Minard's 1869 map of Napoleon's Russian campaign uses the same flow-band idiom and is the canonical predecessor.

Accessibility notes

Provide a table of source-target-value triples and announce flow magnitudes for screen readers.

Related reading

Got data? Let's see what works.

Drop your CSV. You'll get a Sankey Diagram plus four alternatives - ranked by which one actually fits your data best.