Sankey & Alluvial Diagrams
Usage
jggsankeyfier(
data,
diagram_type = "sankey",
value_var,
source_var = NULL,
target_var = NULL,
node_vars = NULL,
grouping_var = NULL,
time_var = NULL,
node_width = 0.5,
node_spacing = 0.1,
edge_alpha = 0.6,
color_palette = "default",
show_labels = TRUE,
label_size = 10,
iterations = 32,
show_values = TRUE,
value_format = "raw",
sort_nodes = "original",
flow_direction = "left_right",
plot_title = "",
plot_subtitle = "",
theme_style = "default",
show_statistics = FALSE,
show_interpretation = TRUE,
output_format = "plot_only"
)
Arguments
- data
.
- diagram_type
.
- value_var
Variable containing flow values/weights
- source_var
Variable defining source nodes
- target_var
Variable defining target nodes
- node_vars
Variables for multi-level node definitions
- grouping_var
Variable for grouping flows
- time_var
Variable for temporal flow analysis
- node_width
Width of nodes in the diagram
- node_spacing
Spacing between nodes
- edge_alpha
Transparency level for edges
- color_palette
.
- show_labels
.
- label_size
.
- iterations
Number of iterations for layout optimization
- show_values
.
- value_format
.
- sort_nodes
.
- flow_direction
.
- plot_title
.
- plot_subtitle
.
- theme_style
.
- show_statistics
.
- show_interpretation
.
- output_format
.
Value
A results object containing:
results$plot | an image | ||||
results$datatab | a table | ||||
results$stats | a table | ||||
results$interpretation | a html |
Tables can be converted to data frames with asDF
or as.data.frame
. For example:
results$datatab$asDF
as.data.frame(results$datatab)