prepare_for_trajectory_chart: Prepares pre-processed data for plotting a trajectory chart

Description Usage Arguments Value Examples

View source: R/prepare_for_trajectory_chart.R

Description

Prepares pre-processed data for plotting a trajectory chart

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
prepare_for_trajectory_chart(
  data_preprocessed,
  sector_filter,
  technology_filter,
  region_filter,
  scenario_source_filter,
  value_name,
  end_year_filter = 2025,
  normalize_to_start_year = TRUE
)

Arguments

data_preprocessed

Pre-processed input data.

sector_filter

Sector for which to filter the data (character string).

technology_filter

Technology for which to filter the data (character string).

region_filter

Region for which to filter the data (character string).

scenario_source_filter

Scenario source for which to filter the data (character string).

value_name

The name of the value to be plotted in the trajectory chart (character string).

end_year_filter

Cut-off year for the chart (an integer).

normalize_to_start_year

Flag indicating whether the values should be normalized (boolean).

Value

FIXME: A data frame (invisibly by default and visibly if normalize_to_start_year = FALSE).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
raw <- get_example_data()
processed <- process_input_data(raw)

prepare_for_trajectory_chart(
  processed,
  sector_filter = "power",
  technology_filter = "oilcap",
  region_filter = "global",
  scenario_source_filter = "demo_2020",
  value_name = "production"
)

2DegreesInvesting/r2dii.ggplot documentation built on April 15, 2021, 5:22 a.m.