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)
| value | source | target |
|---|---|---|
| 40 | Coal | Electricity |
| 25 | Gas | Electricity |
| 15 | Gas | Heating |
| 10 | Solar | Electricity |
| 35 | Electricity | Residential |
| 30 | Electricity | Industrial |
| 10 | Electricity | Losses |
| 15 | Heating | Residential |
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
| Property | Value |
|---|---|
| Min Rows | 4 |
| Min Columns | 3 |
| Column Types | stringstringnumber |
| Notes | Requires 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.