How do I create a Sankey diagram?

What is a Sankey Diagram?

Sankey diagram is a visualization that helps illustrate the size and proportion of flow of information. Sankey diagrams are named after Captain Riall Sankey who used these flow diagrams to depict the efficiency of steam engine, and popularized by Edward Tuftein his citations to Joseph Minard's Flow map.

Why Sankey in Perspective?

Creating Sankey diagrams usually required expensive specialized engineering software on a desktop or graphics programming skills...until now. You can now create and edit Sankey diagrams right from your iPad. It is as simple as loading a spreadsheet, or just enter the data in Perspective. Sankey diagram is hailed by visualization experts such as Edward Tufte because of its elegant richness in displaying information. 

How do I format my data so that it works with Sankey?

A Sankey diagram is represented as a collection flow Values from Source to Target. As such you need three dimensions in your data:

1) Source
2) Target
3) Value

Source and Target usually comprise of text, the Value must be a numeric.

Source, Target, Value
Gross Income, Taxes, 50000.00
Gross Income, Business Expenses, 4500.00

Any schema that adheres to the above requirements (two text columns and a numeric one) can be mapped to a Sankey diagram in Perspective, no matter what the dimension names may be. Here is an example to get you started: sankey.csv.

Disclosures & Limitations

We are grateful for the work by Mike Bostock and d3js which provided us with a great starting point to build on. The current implementation includes some restrictions at the moment. Sankey Expert Tool does not support cycles. There is a natural limit to how much information you can cram into the iPad screen. We have tried it and it works for up to 50 or so flows.