From d4c02e80664323a2c029b3f1e09f561f9dc91139 Mon Sep 17 00:00:00 2001 From: MonikaFu Date: Fri, 24 May 2024 18:10:53 +0200 Subject: [PATCH 1/3] Update scenario used --- R/render_executive_summary.R | 4 ++-- data-raw/scenario_thresholds.R | 5 ++++- data/scenario_thresholds.rda | Bin 268 -> 297 bytes 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/R/render_executive_summary.R b/R/render_executive_summary.R index aa2a98e7..0cb782a0 100644 --- a/R/render_executive_summary.R +++ b/R/render_executive_summary.R @@ -30,8 +30,8 @@ render_executive_summary <- function(data, portfolio_name, peer_group, total_portfolio, - scenario_source = "GECO2021", - scenario_selected = "1.5C-Unif", + scenario_source = "WEO2023", + scenario_selected = "NZE", currency_exchange_value, log_dir) { render( diff --git a/data-raw/scenario_thresholds.R b/data-raw/scenario_thresholds.R index 6697fd7d..3af7c40a 100644 --- a/data-raw/scenario_thresholds.R +++ b/data-raw/scenario_thresholds.R @@ -6,7 +6,10 @@ scenario_thresholds <- tibble::tribble( "GECO2021", "CurPol", "low", "GECO2023", "1.5C", "high", "GECO2023", "NDC-LTS", "mid", - "GECO2023", "Reference", "low" + "GECO2023", "Reference", "low", + "WEO2023", "NZE", "high", + "WEO2023", "APS", "mid", + "WEO2023", "STEPS", "low" ) # styler: on diff --git a/data/scenario_thresholds.rda b/data/scenario_thresholds.rda index 9ae6c09b14bc75a100274742b4295b7d0fbf8e32..437acfb2f52c2cfd25d37d61ffbef0a78c739485 100644 GIT binary patch literal 297 zcmV+^0oMLPT4*^jL0KkKS>P#?x&Q$Df589p$N&HXdH^nk-q642o`66A0D-Uo`%Da^ zYH5>96Gx-~8Vwp@292Z*B|S~4nv7)wO)(7_3`UwXV1SZJ8fanw000bwKn)HGbs~s` z1MGx3GCVUG=iHwh-(f)eAp18-!bBEeMH$*E%h$$(YDhAX$z+ZL5H@4vX6&guplmS$ z7tn!{2QWApm~#M<=cT|r(I`%}-UUi3QJ~g>fVGfp+%@rOjN>eVm2`|;NeFK!6DH;I zX)6wjcvc>G)h0=Jg}|~CIzuU-zSX7M8C|1d3zZ}=9&(vjD?LmCAmNL_bjGm*19_mJ vzNkQ4M`jTUi}xuGG#)#dZ4z?1X&PG*&w(>2kAJKP2>veQig2MJz*8r5yR~-# literal 268 zcmV+n0rUPsT4*^jL0KkKS$R19l>h+Df589p$N&HXdH@cE-axbN_=rkK z)G-VujR4RxX^7Abq!<7I00E%T27qV;ib&Jc(s@iw2w@nRpbZI;0Gibl6QV5;Oai9L zYhbNUpA(>qM~^c|ffm?^oX%B81%jJ${a4Ig9P(I?ds9h3Vrd32Nq|9w0k%P*ByjtH z61o)UE0UnIiq6q#6?HK`F;oefqpd=85~7nRmd}#Iv4Xf|+%e`Lx)wINQp@&_dvEI% zok;IhjTqgoR)!N05e|`9VMy3O(OF6;en>%)BQX%jKXi(A`HdxQ#b@Jl7Hn{ihnF;g S=k-G$_`8xR!i0m#$Ly$K;&d|r From d6b23fb1a356047179a5ec9c4a1c5f44f649d066 Mon Sep 17 00:00:00 2001 From: MonikaFu Date: Fri, 24 May 2024 18:19:12 +0200 Subject: [PATCH 2/3] Update defaults --- R/prep_alignment_table.R | 2 +- R/prep_exposures_scorecard.R | 2 +- R/prep_fossil_bars.R | 2 +- R/prep_green_brown_bars.R | 2 +- R/prep_scatter.R | 4 ++-- R/prep_scores.R | 4 ++-- R/prep_scores_scorecard.R | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/prep_alignment_table.R b/R/prep_alignment_table.R index d8067bd7..fd9d2787 100644 --- a/R/prep_alignment_table.R +++ b/R/prep_alignment_table.R @@ -19,7 +19,7 @@ prep_alignment_table <- function(results_portfolio, peers_results_aggregated, asset_class = c("equity", "bonds"), - scenario_source = "GECO2021") { + scenario_source = "WEO2023") { if (is.null(results_portfolio)) { data_out <- use_toy_data("alignment_table") %>% filter(asset_class == .env$asset_class) } else { diff --git a/R/prep_exposures_scorecard.R b/R/prep_exposures_scorecard.R index fd8540f1..9cdeb35c 100644 --- a/R/prep_exposures_scorecard.R +++ b/R/prep_exposures_scorecard.R @@ -14,7 +14,7 @@ #' @return data.frame #' @export prep_exposures_scorecard <- function(results_portfolio, - scenario_selected = "1.5C-Unif") { + scenario_selected = "NZE") { if (is.null(results_portfolio)) { data_out <- use_toy_data("exposures_scorecard") } else { diff --git a/R/prep_fossil_bars.R b/R/prep_fossil_bars.R index 0bf295e0..d9900988 100644 --- a/R/prep_fossil_bars.R +++ b/R/prep_fossil_bars.R @@ -20,7 +20,7 @@ prep_fossil_bars <- function(results_portfolio, peers_results_aggregated, indices_results_portfolio, - scenario_selected = "1.5C-Unif") { + scenario_selected = "NZE") { if (is.null(results_portfolio)) { data_out <- use_toy_data("fossil_bars") } else { diff --git a/R/prep_green_brown_bars.R b/R/prep_green_brown_bars.R index f5d90c12..9a340d7a 100644 --- a/R/prep_green_brown_bars.R +++ b/R/prep_green_brown_bars.R @@ -13,7 +13,7 @@ #' @return data.frame #' @export prep_green_brown_bars <- function(results_portfolio, - scenario_selected = "1.5C-Unif") { + scenario_selected = "NZE") { if (is.null(results_portfolio)) { data_out <- use_toy_data("green_brown_bars") } else { diff --git a/R/prep_scatter.R b/R/prep_scatter.R index 35e8f0f2..923776ef 100644 --- a/R/prep_scatter.R +++ b/R/prep_scatter.R @@ -14,8 +14,8 @@ prep_scatter <- function(results_portfolio, peers_results_aggregated, peers_results_individual, indices_results_portfolio, - scenario_source = "GECO2021", - scenario_selected = "1.5C-Unif", + scenario_source = "WEO2023", + scenario_selected = "NZE", asset_class = c("equity", "bonds")) { if (is.null(results_portfolio)) { data_out <- use_toy_data("scatter") %>% diff --git a/R/prep_scores.R b/R/prep_scores.R index 5201815a..23c68eef 100644 --- a/R/prep_scores.R +++ b/R/prep_scores.R @@ -19,7 +19,7 @@ prep_scores <- function(results_portfolio, peers_results_aggregated, asset_class = c("equity", "bonds"), - scenario_source = "GECO2021") { + scenario_source = "WEO2023") { if (is.null(results_portfolio)) { data_out <- use_toy_data("scores") %>% filter(asset_class == .env$asset_class) } else { @@ -31,7 +31,7 @@ prep_scores <- function(results_portfolio, scenario_source = scenario_source ) - portfolio_data_asset <- results_portfolio %>% + portfolio_data_asset <- results_portfolio %>% filter(asset_class == .env$asset_class) if (nrow(portfolio_data_asset) > 0) { # infer start_year diff --git a/R/prep_scores_scorecard.R b/R/prep_scores_scorecard.R index 9559fc37..26db72e3 100644 --- a/R/prep_scores_scorecard.R +++ b/R/prep_scores_scorecard.R @@ -15,7 +15,7 @@ #' @return data.frame #' @export prep_scores_scorecard <- function(results_portfolio, - scenario_source = "GECO2021") { + scenario_source = "WEO2023") { if (is.null(results_portfolio)) { data_out <- use_toy_data("scores") %>% filter( .data$scope == "portfolio", From 2f5619673ccb3cd88acddf8d2b8052ea11460c74 Mon Sep 17 00:00:00 2001 From: Jackson Hoffart Date: Mon, 27 May 2024 11:48:44 +0200 Subject: [PATCH 3/3] document --- man/prep_alignment_table.Rd | 2 +- man/prep_exposures_scorecard.Rd | 2 +- man/prep_fossil_bars.Rd | 2 +- man/prep_green_brown_bars.Rd | 2 +- man/prep_scatter.Rd | 4 ++-- man/prep_scores.Rd | 2 +- man/prep_scores_scorecard.Rd | 2 +- man/render_executive_summary.Rd | 4 ++-- man/scenario_thresholds.Rd | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/man/prep_alignment_table.Rd b/man/prep_alignment_table.Rd index 690ec4e7..32016f1c 100644 --- a/man/prep_alignment_table.Rd +++ b/man/prep_alignment_table.Rd @@ -8,7 +8,7 @@ prep_alignment_table( results_portfolio, peers_results_aggregated, asset_class = c("equity", "bonds"), - scenario_source = "GECO2021" + scenario_source = "WEO2023" ) } \arguments{ diff --git a/man/prep_exposures_scorecard.Rd b/man/prep_exposures_scorecard.Rd index 1a060c24..73e8fed4 100644 --- a/man/prep_exposures_scorecard.Rd +++ b/man/prep_exposures_scorecard.Rd @@ -4,7 +4,7 @@ \alias{prep_exposures_scorecard} \title{Prepare data input for plotting exposure chart on the climate score card} \usage{ -prep_exposures_scorecard(results_portfolio, scenario_selected = "1.5C-Unif") +prep_exposures_scorecard(results_portfolio, scenario_selected = "NZE") } \arguments{ \item{results_portfolio}{Data frame that contains pre-wrangled portfolio diff --git a/man/prep_fossil_bars.Rd b/man/prep_fossil_bars.Rd index 16c70609..e8962fa1 100644 --- a/man/prep_fossil_bars.Rd +++ b/man/prep_fossil_bars.Rd @@ -8,7 +8,7 @@ prep_fossil_bars( results_portfolio, peers_results_aggregated, indices_results_portfolio, - scenario_selected = "1.5C-Unif" + scenario_selected = "NZE" ) } \arguments{ diff --git a/man/prep_green_brown_bars.Rd b/man/prep_green_brown_bars.Rd index 9a00ab91..3b551f48 100644 --- a/man/prep_green_brown_bars.Rd +++ b/man/prep_green_brown_bars.Rd @@ -4,7 +4,7 @@ \alias{prep_green_brown_bars} \title{Prepare data input for plotting green brown bar chart} \usage{ -prep_green_brown_bars(results_portfolio, scenario_selected = "1.5C-Unif") +prep_green_brown_bars(results_portfolio, scenario_selected = "NZE") } \arguments{ \item{results_portfolio}{Data frame that contains pre-wrangled portfolio diff --git a/man/prep_scatter.Rd b/man/prep_scatter.Rd index a02cda53..6649fcd3 100644 --- a/man/prep_scatter.Rd +++ b/man/prep_scatter.Rd @@ -9,8 +9,8 @@ prep_scatter( peers_results_aggregated, peers_results_individual, indices_results_portfolio, - scenario_source = "GECO2021", - scenario_selected = "1.5C-Unif", + scenario_source = "WEO2023", + scenario_selected = "NZE", asset_class = c("equity", "bonds") ) } diff --git a/man/prep_scores.Rd b/man/prep_scores.Rd index bcbe4db9..bd67f706 100644 --- a/man/prep_scores.Rd +++ b/man/prep_scores.Rd @@ -8,7 +8,7 @@ prep_scores( results_portfolio, peers_results_aggregated, asset_class = c("equity", "bonds"), - scenario_source = "GECO2021" + scenario_source = "WEO2023" ) } \arguments{ diff --git a/man/prep_scores_scorecard.Rd b/man/prep_scores_scorecard.Rd index d4fd349f..bd79ae22 100644 --- a/man/prep_scores_scorecard.Rd +++ b/man/prep_scores_scorecard.Rd @@ -5,7 +5,7 @@ \title{Prepare data input for plotting aggregate climate scores in the scorecard section} \usage{ -prep_scores_scorecard(results_portfolio, scenario_source = "GECO2021") +prep_scores_scorecard(results_portfolio, scenario_source = "WEO2023") } \arguments{ \item{results_portfolio}{Data frame that contains pre-wrangled portfolio diff --git a/man/render_executive_summary.Rd b/man/render_executive_summary.Rd index 44e51e36..7ed2939d 100644 --- a/man/render_executive_summary.Rd +++ b/man/render_executive_summary.Rd @@ -16,8 +16,8 @@ render_executive_summary( portfolio_name, peer_group, total_portfolio, - scenario_source = "GECO2021", - scenario_selected = "1.5C-Unif", + scenario_source = "WEO2023", + scenario_selected = "NZE", currency_exchange_value, log_dir ) diff --git a/man/scenario_thresholds.Rd b/man/scenario_thresholds.Rd index 4a9c62ef..4a02edac 100644 --- a/man/scenario_thresholds.Rd +++ b/man/scenario_thresholds.Rd @@ -5,7 +5,7 @@ \alias{scenario_thresholds} \title{Scenario names mapped to temperature thresholds} \format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 6 rows and 3 columns. +An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 9 rows and 3 columns. } \usage{ scenario_thresholds