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