corybrunson / ggalluvial

ggplot2 extension for alluvial plots
http://corybrunson.github.io/ggalluvial/
GNU General Public License v3.0
497 stars 34 forks source link

Alluvial diagram vs Sankey diagram? #11

Closed heoa closed 6 years ago

heoa commented 6 years ago

Alluvial diagrams look very similar to sankey diagrams.

What is the difference between Sankey diagrams and Alluvial diagrams?

enter image description here

corybrunson commented 6 years ago

My sense is that Sankey diagrams have a longer history and are therefore more well-defined based on tradition (see the Wikipedia page). They consist of directed arrows or bands whose widths reflect the weight (e.g. the volume) of the flows from node to node. The diagrams are otherwise quite flexible—the locations of nodes are not pre-determined, and arrows can turn to point up and down as well as sideways—so that the designer has more aesthetic control. Though this depends on the application used to generate them. The diagram you posted is typical; the bands run horizontally from node to node, and each band may or may not be incident to a node at each horizontal position. Other applications might use a graphical user interface to allow a designer to arrange nodes and arrows manually (though i don't actually know of any such applications).

Alluvial diagrams per se have, to my knowledge, only come about in the last decade. The first i heard of them was this paper at PLOS One. They're usually more rigid than Sankey diagrams, in my experience: every band must be incident with a node at each horizontal position, and often the bands don't change weight from node to node. This is because the diagrams encode data in a strict format, as i've tried to describe in the vignette to this package. So i think of them as being better-suited to the "grammar of graphics" paradigm, which produces data visualizations by combining a limited vocabulary of optional statistical transformations and mappings to visual elements, resulting in plots that are strictly determined from the data. In this way they provide a good balance between flexibility and reproducibility.