Skip to contents

Prepare data to plot using plot_sankey()

Usage

prep_sankey(
  data_alignment,
  region,
  year,
  group_var,
  middle_node,
  middle_node2 = NULL
)

Arguments

data_alignment

data.frame. Holds aggregated alignment metrics per company for tms sectors. Must contain columns: "name_abcd", "sector" and any column implied by group_var.

region

Character. Region to filter data_alignment data frame on.

year

Integer. Year on which data_alignment should be filtered.

group_var

Character. Vector of length 1. Variable to group by.

middle_node

Character. Column specifying the middle nodes to be plotted in sankey plot. Must be present in data_alignment.

middle_node2

Character. Column specifying the middle nodes to be plotted in sankey plot. Must be present in data_alignment.

Value

data.frame

Examples

# TODO