Learn R Programming

easyalluvial (version 0.4.0)

Generate Alluvial Plots with a Single Line of Code

Description

Alluvial plots are similar to sankey diagrams and visualise categorical data over multiple dimensions as flows. (Rosvall M, Bergstrom CT (2010) Mapping Change in Large Networks. PLoS ONE 5(1): e8694. Their graphical grammar however is a bit more complex then that of a regular x/y plots. The 'ggalluvial' package made a great job of translating that grammar into 'ggplot2' syntax and gives you many options to tweak the appearance of an alluvial plot, however there still remains a multi-layered complexity that makes it difficult to use 'ggalluvial' for explorative data analysis. 'easyalluvial' provides a simple interface to this package that allows you to produce a decent alluvial plot from any dataframe in either long or wide format from a single line of code while also handling continuous data. It is meant to allow a quick visualisation of entire dataframes with a focus on different colouring options that can make alluvial plots a great tool for data exploration.

Copy Link

Version

Install

install.packages('easyalluvial')

Monthly Downloads

356

Version

0.4.0

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Bjoern Koneswarakantha

Last Published

September 3rd, 2025

Functions in easyalluvial (0.4.0)

palette_increase_length

increases length of palette by repeating colours
manip_factor_2_numeric

converts factor to numeric preserving numeric levels and order in character levels.
palette_filter

color filters for any vector of hex color values
manip_explicit_na

Make NA levels explicit
quarterly_flights

Quarterly mean arrival delay times for a set of 402 flights
plot_all_hists

plot marginal histograms of alluvial plot
palette_plot_rgp

plot rgb values of palette
palette_plot_intensity

plot colour intensity of palette
plot_condensation

Plot dataframe condensation potential
quarterly_sunspots

Quarterly mean relative sunspots number from 1749-1983
manip_get_ggplot_data

Get ggplot data
mtcars2

mtcars dataset with cyl, vs, am ,gear, carb as factor variables and car model names as id
get_pdp_predictions_seq

get predictions compatible with the partial dependence plotting method, sequential variant that only works for numeric predictions.
manip_bin_numerics

bin numerical columns
palette_qualitative

compose palette from qualitative RColorBrewer palettes
%>%

Pipe operator
plot_hist

plot histogram of alluvial plot variable
plot_imp

plot feature importance
tidy_imp

tidy up dataframe containing model feature importance
titanic

titanic data set'
check_pkg_installed

check if package is installed
alluvial_model_response

create model response plot
alluvial_wide

alluvial plot of data in wide format
get_pdp_predictions

get predictions compatible with the partial dependence plotting method
alluvial_model_response_parsnip

create model response plot for parsnip models
alluvial_model_response_caret

create model response plot for caret models
add_marginal_histograms

add marginal histograms to alluvial plot
get_data_space

calculate data space
add_imp_plot

add bar plot of important features to model response alluvial plot
alluvial_long

alluvial plot of data in long format