Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

riverplot-package

Sankey / ribbon diagrams


Description

Sankey / ribbon diagrams

Details

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

Mini-gallery

Simple example from riverplot.example function: plot( riverplot.example() ).

Simple example

Recreation of the famous figure by Charles Minard (see minard for details).

Minard

Author(s)

January Weiner <january.weiner@gmail.com>


riverplot

Sankey or Ribbon Plots

v0.10
GPL (>= 2.0)
Authors
January Weiner <january.weiner@gmail.com>
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.