R/target_sda.R
target_sda.Rd
This function calculates targets of CO2 emissions per unit production at the portfolio-level, otherwise referred to as "emissions factors". It uses the sectoral-decarbonization approach (SDA) to calculate these targets.
target_sda( data, ald, co2_intensity_scenario, use_credit_limit = FALSE, by_company = FALSE )
data | A dataframe like the output of
|
---|---|
ald | An asset-level data frame like r2dii.data::ald_demo. |
co2_intensity_scenario | A scenario data frame like r2dii.data::co2_intensity_scenario_demo. |
use_credit_limit | Logical vector of length 1. |
by_company | Logical vector of length 1. |
A tibble with the CO2 emissions factors attributed to
the portfolio. These values include the portfolio's actual projected CO2
emissions factors, the scenario pathway CO2 emissions factors and the SDA
calculated portfolio target emissions factors (see column
emission_factor_metric
).
This function ignores existing groups and outputs ungrouped data.
Other functions to calculate scenario targets:
target_market_share()
installed <- requireNamespace("r2dii.match", quietly = TRUE) && requireNamespace("r2dii.data", quietly = TRUE) if (installed) { library(r2dii.match) library(r2dii.data) # Example datasets from r2dii.data loanbook <- head(loanbook_demo, 150) ald <- head(ald_demo, 100) co2_scenario <- co2_intensity_scenario_demo # WARNING: Remember to validate matches (see `?prioritize`) matched <- prioritize(match_name(loanbook, ald)) # You may need to clean your data anyNA(ald$emission_factor) try(target_sda(matched, ald, co2_intensity_scenario = co2_scenario)) ald2 <- subset(ald, !is.na(emission_factor)) anyNA(ald2$emission_factor) out <- target_sda(matched, ald2, co2_intensity_scenario = co2_scenario) # The output includes the portfolio's actual projected emissions factors, the # scenario pathway emissions factors, and the portfolio's target emissions # factors. out # Split-view by metric split(out, out$emission_factor_metric) # Calculate company-level targets out <- target_sda( matched, ald2, co2_intensity_scenario = co2_scenario, by_company = TRUE ) out }#> Warning: Removing ald rows where `emission_factor` is NA#> # A tibble: 75 × 5 #> sector year emission_factor_metric emission_factor_value name_ald #> <chr> <dbl> <chr> <dbl> <chr> #> 1 cement 2013 corporate_economy 0.643 market #> 2 cement 2014 corporate_economy 0.654 market #> 3 cement 2015 corporate_economy 0.666 market #> 4 cement 2016 corporate_economy 0.677 market #> 5 cement 2017 corporate_economy 0.689 market #> 6 cement 2018 corporate_economy 0.700 market #> 7 cement 2019 corporate_economy 0.712 market #> 8 cement 2020 corporate_economy 0.723 market #> 9 cement 2021 corporate_economy 0.735 market #> 10 cement 2022 corporate_economy 0.746 market #> # … with 65 more rows