# Category: General

## Sankey Diagram using TikZ

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).

## Y U No Sankey?

I swear I didn’t create this one … found it here. It really made me smile.

Promise I will make more Sankey diagrams!

Back at my desk after the holiday season…. Happy New Year to all of you. To start off the blogging this year, here is a funny twitter conversation on Sankey diagrams.

Quite an impressive number of ?s and !s…. and, well, geography is more interesting anyway. ðŸ˜‰

## U-turn Sankey arrows

This legacy article on ‘Solar Energy System and Design’ by W.B. Stine and R.W. Harrigan (published in 1985 already) has four Sankey diagrams for energy flows in a solar power system.

The old-school black&white Sankey diagrams depicted have a general vertical orientation, and some flows branch out to the left of the general flow direction. This is OK, but the first branch flow bends with an angle larger than 90Â° degrees, performing an almost U-turn.

In the next diagram this idea is doomed to fail as the Sankey arrow to the left is wider than the one going straight on, and the initial parallel segment is much too short.

Additionally in this second Sankey diagram the two arrows at the bottom don’t add up with their flow quantities correctly (633 kW + 244 kW is not 1008 kW).

## Sankey Software Page Update

Just to let you know that I have made some updates to the Sankey Software page. Added tamc/Sankey and Foreseer (how was it possible I hadn’t done this before?!), removed some outdated links, updated license cost for one or two tools and so on…

## sankey-diagrams.com downtime

Had some trouble with the server that hosts the blog. There was some downtime, and I hope that you didn’t turn away from the blog annoyed… Back now!

## New blog on MFA diagrams

A new blog dedicated to Material Flow Analysis (MFA) diagrams is available over at blogspot.

Material Flow Analysis (also refered to as Material Flow Accounting) is a research topic that focuses on specific substances or material flows on a macro level. Typically the system boundaries are a region or a country. Urban metabolism studies also use MFA diagrams. A key feature is the representation of stocks (storage or accumulation of material) within the system.

I have previously presented MFA diagram samples here on the blog that have Sankey diagram characteristics (i.e. arrow magnitudes proportional to flow quantities, directional arrows).

Here are two examples of MFA diagrams from the new blog for you to enjoy:

Platinum Flows in Europe. Source: Saurat, M., Bringezu, S., 2008. Platinum Group Metal Flows of Europe, Part 1 (via MFA diagram blog)

Phosphorus Flows. Source: Paul H. Brunner, 2007. MFA of regional lead flows and stocks [t/y] (via MFA diagram blog)

Make sure you visit the MFA diagram blog from time to time (I have put the link in the blogroll on the right), to see new interesting diagrams. I will also try to present some of them here…