ggalluvial: Layered Grammar for Alluvial Plots
- PMID: 36919162
- PMCID: PMC10010671
- DOI: 10.21105/joss.02017
ggalluvial: Layered Grammar for Alluvial Plots
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.
Figures
References
-
- 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
-
- Bojanowski M, & Edwards R (2016). alluvial: R Package for Creating Alluvial Diagrams. Retrieved from https://cran.r-project.org/package=alluvial
-
- Brunson JC (2019). ggalluvial: Alluvial Plots in ‘ggplot2’. Retrieved from https://cran.r-project.org/package=ggalluvial - PMC - PubMed
-
- Csárdi G, & Weiner J (2017). sankey: Illustrate the Flow of Information or Material. Retrieved from https://cran.r-project.org/package=sankey
-
- 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
Grants and funding
LinkOut - more resources
Full Text Sources