Learn R Programming

easyalluvial (version 0.4.1)

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

641

Version

0.4.1

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Bjoern Koneswarakantha

Last Published

July 31st, 2026

Functions in easyalluvial (0.4.1)

manip_explicit_na

Make NA levels explicit
palette_filter

color filters for any vector of hex color values
manip_bin_numerics

bin numerical columns
%>%

Pipe operator
palette_plot_intensity

plot colour intensity of palette
quarterly_flights

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

Quarterly mean relative sunspots number from 1749-1983
palette_plot_rgp

plot rgb values of palette
manip_factor_2_numeric

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

plot histogram of alluvial plot variable
plot_imp

plot feature importance
palette_increase_length

increases length of palette by repeating colours
plot_condensation

Plot dataframe condensation potential
plot_all_hists

plot marginal histograms of alluvial plot
tidy_imp

tidy up dataframe containing model feature importance
titanic

titanic data set'
alluvial_wide

alluvial plot of data in wide format
alluvial_long

alluvial plot of data in long format
check_pkg_installed

check if package is installed
alluvial_model_response

create model response plot
alluvial_model_response_caret

create model response plot for caret models
add_imp_plot

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

get predictions compatible with the partial dependence plotting method
add_marginal_histograms

add marginal histograms to alluvial plot
alluvial_model_response_parsnip

create model response plot for parsnip models
get_data_space

calculate data space
get_pdp_predictions_seq

get predictions compatible with the partial dependence plotting method, sequential variant that only works for numeric predictions.
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
palette_qualitative

compose palette from qualitative RColorBrewer palettes