Skip to contents

Prepare data to plot using plot_sankey()

Usage

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

Arguments

data_alignment

data.frame. Holds aggregated alignment metrics per company for tms sectors. Must contain columns: group_id, name_abcd, sector.

matched_loanbook

data.frame. Holds the matched loan books of a set of groups. Must include a column group_id and loan_size_outstanding.

region

Character. Region to filter data_alignment data frame on.

year

Integer. Year on which data_alignment should be filtered.

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