ggplot2 is a very popular R package for data visualization. When Dr. Jason (Cory) Brunson, a postdoctoral fellow, engaged in a data analysis project with the State Comptroller’s office, he began developing an extension to ggplot2 to create so-called alluvial diagrams, like the one used by Bergstrom and Rosvall in their PLOS One paper.[1] Dr. Brunson kept working on it intermittently, and a couple of months ago he submitted it to CRAN, which is the primary repository for stable R packages.[2].
Alluvial diagrams can be used to represent repeated categorical measures, classifications that evolve over time, and multi-dimensional categorical data. ggalluvial produces alluvial diagrams using the principles and syntax of the tidyverse packages, including ggplot2 and tidyr.
Please click on the link to an introduction/tutorial that he wrote.[3]
[1]: http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0008694
[2]: https://cran.r-project.org/package=ggalluvial
[3]: https://cran.r-project.org/web/packages/ggalluvial/vignettes/ggalluvial.html