Learn R Programming

easyalluvial (version 0.3.2)

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

373

Version

0.3.2

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Bjoern Koneswarakantha

Last Published

December 7th, 2023

Functions in easyalluvial (0.3.2)

mtcars2

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

tidy up dataframe containing model feature importance
quarterly_sunspots

Quarterly mean relative sunspots number from 1749-1983
plot_all_hists

plot marginal histograms of alluvial plot
plot_condensation

Plot dataframe condensation potential
quarterly_flights

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

plot histogram of alluvial plot variable
plot_imp

plot feature importance
titanic

titanic data set'
alluvial_wide

alluvial plot of data in wide format
alluvial_model_response_parsnip

create model response plot for parsnip models
add_marginal_histograms

add marginal histograms to alluvial plot
alluvial_model_response

create model response plot
get_pdp_predictions

get predictions compatible with the partial dependence plotting method
check_pkg_installed

check if package is installed
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
alluvial_long

alluvial plot of data in long format
get_data_space

calculate data space
palette_plot_rgp

plot rgb values of palette
manip_bin_numerics

bin numerical columns
get_pdp_predictions_seq

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

color filters for any vector of hex color values
palette_plot_intensity

plot colour intensity of palette
manip_factor_2_numeric

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

compose palette from qualitative RColorBrewer palettes
%>%

Pipe operator
palette_increase_length

increases length of palette by repeating colours