Skip to contents

Given a named list of scenarios returns a cleaner scenarios dataframe

Usage

sector_profile_any_prepare_scenario(scenarios)

Arguments

scenarios

A named list of identically structured scenarios.

Value

A single, cleaner dataframe with an additional column to identify which rows come from which scenario.

Examples

library(dplyr, warn.conflicts = FALSE)
library(readr, warn.conflicts = FALSE)

raw_weo <- example_raw_weo()
raw_ipr <- example_raw_ipr()
raw_scenarios <- list(weo = raw_weo, ipr = raw_ipr)

sector_profile_any_prepare_scenario(raw_scenarios)
#> # A tibble: 4 × 6
#>   scenario                   sector subsector              year reductions type 
#>   <chr>                      <chr>  <chr>                 <dbl>      <dbl> <chr>
#> 1 stated policies scenario   total  biofuels production …  2020       0    weo  
#> 2 announced pledges scenario total  biofuels production …  2020       0    weo  
#> 3 1.5c rps                   power  NA                     2030       0.58 ipr  
#> 4 1.5c rps                   power  NA                     2050       1.06 ipr