Prepare data to plot scatterplot
Usage
prep_scatter(
data_bopo,
data_net,
data_level = c("group_var", "company"),
year,
sector,
region,
group_var,
groups_to_plot = NULL
)
Arguments
- data_bopo
data.frame. Data containing buildout and phaseout alignment values. Must contain columns:
'year'
,'sector'
,'region'
,'direction'
and either'name_abcd'
and'alignment_metric'
or'exposure_weighted_net_alignment'
plus any column implied bygroup_var
.- data_net
data.frame. Data containing net alignment values. Must contain columns:
group_var
,'year'
,'sector'
,'region'
,'direction'
and either'name_abcd'
and'alignment_metric'
or'exposure_weighted_net_alignment'
.- data_level
Character. Level of the plotted data. Can be
'group_var'
or'company'
.- year
Integer. Year on which the data should be filtered.
- sector
Character. Sector to filter data on.
- region
Character. Region to filter data on.
- group_var
Character. Vector of length 1. Variable to group by.
- groups_to_plot
Character vector. Groups to filter on.