Steve Bogart has released a website for autoMATICally creating simple horizontal distribution diagrams. No need to install a tool, just go to sankeymatic.com and enter your values. On each line define source node, quantity in square brackets, destination node (e.g. “Budget [450] Housing” or “Budget [300] Food”). Columns and bands will be created automatically.

A number of options can be set, such as colors, spacing and labels. Finally, when you have created your diagram you can download it directly (three sizes/resolutions available).

This simple online tool is based on the open source tool D3.js and its Sankey library.

Try it out yourself!

I have added SankeyMATIC to the list of software tools for Sankey diagrams (seriously thinking about creating an own group for d3.js-based products).

Over at the TeX – LaTeX Stack Exchange (a Q&A site for users of TeX and LaTeX) this article explains “How to draw a Sankey Diagram using TikZ”. Okay, its a bit techie, but the results look good.

The original poster wanted to know how to draw a Sankey diagram using the TikZ package (TikZ is a “higher-level drawing language built on top of the PGF graphics framework”).

User Paul Gaborit came up with this example using TikZ and building his own sankeydiagram environment

The interesting thing is that flows can fork and join, and that there is a check that the sum of quantities must be equal to the quantity of sankey node to fork.

This is how the the original sample Sankey diagram looks like with this solution.

Very nice result. So for those out there used to working with TeX/LaTeX out this is actually a good solution.

Don’t miss to read the comments too (there’s one pointing to an alternative (Matplotlib and Sankey module).

A number of renown partners such as DOE, NREL, Pacific Northwest National Laboratory and more) have created FRED (FRee Energy Data). This interactive website allows visualizing energy data for all U.S. federal states. Here is a screengrab for California 2010:

Go to the website directly to experiment yourself. Here is how to proceed: To start, make sure the layers are turned on (button at the top left), then click on the federal state of your choice. In the pop-up window there are four visualization options: Energy Supply, Energy Demand, Energy Flows, and Energy Forecast. Choose ‘Energy Flows’ to produce the typical production/consumption Sankey diagrams. Hover over the bands to see more detail.

FRED is really intuitive and fun to use. And it is open-access. You have more options when you register. According to the About section, among the future planned developments of FRED are “expanding FRED’s US coverage to global, adding energy expenditures and C02 emissions data, and allow[ing] users to extract FRED data and graphics”. Good!

Color gradients seem to be the new like for Sankey diagrams. I already featured an example in yesterday’s post. The new e!Sankey 3.1 version has a color gradient feature now as well.

This diagram is taken from the samples included in the trial version. Traffic flows at a fictitious highway intersection is shown with the number of cars going from A to B, A to C, and so on.

It is not new at all (see this post) but has been pimped and now sports the color effect and some icons. Nice!

The release of a new tool for Sankey diagrams has passed almost unnoticed. Dr. Hanny J. Berchmans has developed Sankey Diagram Maker and provides it as freeware on Google Docs.

This very basic tool can be used to produce simple Sankey diagrams that have a left-to-right layout and breakouts to the bottom as the above. Data values are fed as text file (CSV format). Colors can be set individually and nice color gradient effects are possible.

I have added Sankey Diagram Maker to the software list.

Bruce from http://ramblings.mcpher.com writes about “how to free your Excel data from your desktop and take advantage of web capabilities such as Docs, Maps, Earth, Gadgets, Visualizations and a whole bunch of other services”. His last contribution is on Sankey Diagrams from Excel, for which he uses d3.js and some work previously done by Mike Bostock.

While I don’t fully agree with Bruce’s definition of Sankey diagrams (“What are Sankey Diagrams? They are designed to show the movement in a network over time.”), this sure is good stuff and great work. You can download the VBA code from his page directly.

Distribution Diagrams (aka ‘Spaghetti Diagrams’) can be created directly from Excel. The interactive version (follow link above image on this page) allows to rearrange the nodes within the same column, and individual bands are highlighted on mouse over.

Why don’t these fully qualify as Sankey diagrams, in my opinion? Why would I rather call them distribution diagrams? It is exactly the fact that these are not directed flows, but rather quantities that are distributed over categories (or dimensions). There is no time relation in them, neither are there flows “from” (e.g. Finance) “to” (e.g. Reporting) or the other way round. These are bands hooked between nodes rather than arrows leading from one node to another. Each category could be represented by a pie chart as well … which would be more boring, of course. No unit given for the value of the flow (I guess it could be US$), but this is not even necessary, as the sum of the bands add up to 100% (like in a pie chart). For those of you interested, I recommend to read on the Parsets page.

Have added Excel to Sankey (based on d3.js) to the software list.

A great post on Sankey diagrams at the visualign blog led me to Sam Calisch’s PDF at github. It contains some insight on the maths behind the drawing of Sankey diagram curves, especially the type known as spaghetti diagram or distribution Sankey diagram (see discussion here).

There are some great scribbles in this paper that I wanted to share.

And I especially like this one, with the little man using the Sankey arrow as a slide…

The article is well-worth reading, so if you are into programming a Sankey software (the Mathematica workbook for Sankey might be a starting point), please download and study it.

I am impressed by the Sankey diagrams produced with ‘sankeypython’, a new open source project. I first came across this in a discussion forum, where Yannick Copin from France presented his work using matprotlib. The project is now at Sourceforge. This sourceforge link not working any more, check Matplotlib project instead (thanks to commenter Johannes for pointing out the brioken link), and several Sankey Diagrams in Python samples can be seen there.


The most important functionality is available, such as labels for flows and units. Diagrams have a basic left-to-right orientation, with vertical arrows branching out on both sides. Color changes seem to be realized by combining several systems. There are apparently no node objects where the flows directly hook to (as is common in other tools), but by interlacing differently colored Sankey arrows a process step becomes kind of implicit.

This has only been up on Sourceforge since June 2011, so it will be interesting to follow further development on ‘Sankey Diagrams in Python’. I have added the project to the list of Sankey diagram software.