Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2020;5(49):2017.
doi: 10.21105/joss.02017. Epub 2020 May 21.

ggalluvial: Layered Grammar for Alluvial Plots

Affiliations

ggalluvial: Layered Grammar for Alluvial Plots

Jason Cory Brunson. J Open Source Softw. 2020.

Abstract

Alluvial diagrams use stacked bar plots and variable-width ribbons to represent multi-dimensional or repeated-measures data comprising categorical or ordinal variables (Bojanowski & Edwards, 2016; Rosvall & Bergstrom, 2010). The ggalluvial package extends the layered grammar of graphics of ggplot2 (Wickham, 2016) to generate alluvial diagrams from tidy data (Wickham, 2014). The package makes two key contributions to the R ecosystem. First, ggalluvial anchors the imprecise notion of an alluvial diagram to the rigid grammar of graphics (Wilkinson, 2006), which lends the plots more precise meaning and opens up many combinatorial possibilities. Second, ggalluvial adopts a distinctive geological nomenclature to distinguish "alluvial plots" and their graphical elements from Sankey diagrams and parallel sets plots, which I hope prove useful as these visualization tools converge toward common standards.

PubMed Disclaimer

Figures

Figure 1:
Figure 1:
Alluvial plot of changes in curricula by a cohort of art students

References

    1. Allaire JJ, Gandrud C, Russell K, & Yetman CJ (2017). networkD3: D3 JavaScript Network Graphs from R. Retrieved from https://cran.r-project.org/package=networkD3
    1. Bojanowski M, & Edwards R (2016). alluvial: R Package for Creating Alluvial Diagrams. Retrieved from https://cran.r-project.org/package=alluvial
    1. Brunson JC (2019). ggalluvial: Alluvial Plots in ‘ggplot2’. Retrieved from https://cran.r-project.org/package=ggalluvial - PMC - PubMed
    1. Csárdi G, & Weiner J (2017). sankey: Illustrate the Flow of Information or Material. Retrieved from https://cran.r-project.org/package=sankey
    1. Edwards DN, & Pinkerton E (2019). Rise of the investor class in the British Columbia Pacific halibut fishery. Marine Policy, 109. doi:10.1016/j.marpol.2019.103676 - DOI

LinkOut - more resources