| Title: | Interactive Alluvial Geoms for 'ggplot2' Using 'ggiraph' |
|---|---|
| Description: | Provides interactive extensions of alluvial geoms from the 'ggalluvial' package for use with 'ggiraph'. The package enables tooltips, hover effects, and clickable elements for alluvial plots created with 'ggplot2', making it easier to explore categorical flow data in interactive visualizations. |
| Authors: | Andreas Mändle [aut, cre] |
| Maintainer: | Andreas Mändle <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-06-01 07:19:49 UTC |
| Source: | https://github.com/bips-hb/ggiraphAlluvial |
This geometry is based on ggalluvial::geom_flow().
See the documentation for those functions for more details.
geom_flow_interactive(...)geom_flow_interactive(...)
... |
arguments passed to base function, plus any of the interactive_parameters. |
# add interactive contours to a ggplot ------- library(ggplot2) library(ggiraph) #... #x <- girafe(ggobj = p) if (interactive()) print(x)# add interactive contours to a ggplot ------- library(ggplot2) library(ggiraph) #... #x <- girafe(ggobj = p) if (interactive()) print(x)
This geometry is based on ggalluvial::geom_stratum().
See the documentation for those functions for more details.
geom_stratum_interactive(...)geom_stratum_interactive(...)
... |
arguments passed to base function, plus any of the interactive_parameters. |
# add interactive contours to a ggplot ------- library(ggplot2) library(ggiraph) #... #x <- girafe(ggobj = p) if (interactive()) print(x)# add interactive contours to a ggplot ------- library(ggplot2) library(ggiraph) #... #x <- girafe(ggobj = p) if (interactive()) print(x)
ggproto class for ggiraph.
geom_flow_interactive returns a layer that contains a GeomInteractiveFlow object. The GeomFlow object is responsible for rendering the data in the plot.
ggproto class for ggiraph.
geom_stratum_interactive returns a layer that contains a GeomInteractiveStratum object. The GeomStratum object is responsible for rendering the data in the plot.
Two helpers to select stratum connected to a flow
stratum_to(x = .data, value = "stratum") stratum_from(x, value = "stratum")stratum_to(x = .data, value = "stratum") stratum_from(x, value = "stratum")
x |
usually the .data pronoun |
value |
="stratum", the value that should be returned, e.g. "stratum" or "x" |
value mapped to the left (from) or right (to) side of the alluvium.
# stratum_to(.data) # stratum_from(.data)# stratum_to(.data) # stratum_from(.data)
ggproto class for ggiraph.
This function binds a dataset to itself along adjacent pairs of a 'key' variable. It is invoked by [ggalluvial::geom_flow()] to convert data in lodes form to something similar to alluvia form.
In contrast to ggalluvial::self_adjoin it also works with unregular coloumn names, which is necessary when "data-id" is passed to extra_interactive_params in an interactive plot.
'self_adjoin' invokes ['dplyr::mutate-joins'] functions in order to convert a dataset with measures along a discrete 'key' variable into a dataset consisting of column bindings of these measures (by any 'by' variables) along adjacent values of 'key'.
self_adjoin( data, key, by = NULL, link = NULL, keep.x = NULL, keep.y = NULL, suffix = c(".x", ".y") )self_adjoin( data, key, by = NULL, link = NULL, keep.x = NULL, keep.y = NULL, suffix = c(".x", ".y") )
data |
A data frame in lodes form (repeated measures data; see ['alluvial-data']). |
key |
Column of 'data' indicating sequential collection; handled as in [tidyr::spread()]. |
by |
Character vector of variables to self-adjoin by; passed to ['dplyr::mutate-joins'] functions. |
link |
Character vector of variables to adjoin. Will be replaced by pairs of variables suffixed by 'suffix'. |
keep.x, keep.y
|
Character vector of variables to associate with the first (respectively, second) copy of 'data' after adjoining. These variables can overlap with each other but cannot overlap with 'by' or 'link'. |
suffix |
Suffixes to add to the adjoined 'link' variables; passed to ['dplyr::mutate-joins'] functions. |
# ## #