Description Details Mini-gallery Author(s)
Sankey / ribbon diagrams
Sankey diagrams are a type of flow diagrams, in which the width of the arrows is proportional to the quantity they illustrate. Riverplot allows the creation, in R, of a basic type of Sankey diagrams.
First, you need to create a specific riverplot object that can be
directly plotted. (Use riverplot.example
to generate an example object).
The simplest way is to create a graph-like representation of you diagram as
a list of nodes; each item in the list is a list of partner nodes.
Furthermore, you need to know at which position (from left to right) each
node resides. Please take a look at the example section in the makeRiver
function.
Once you have created a riverplot object with one of the above methods
(or manually), you can plot it either with plot(x)
or
riverplot(x)
(see riverplot
for details).
Simple example from riverplot.example
function:
plot( riverplot.example() )
.
Recreation of the famous figure by Charles Minard (see
minard
for details).
January Weiner <january.weiner@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.