Skip to content

Commit

Permalink
Update scenario used (#325)
Browse files Browse the repository at this point in the history
* Update scenario used

* Update defaults

* document

---------

Co-authored-by: Jackson Hoffart <[email protected]>
  • Loading branch information
MonikaFu and jdhoffa authored May 28, 2024
1 parent 2d3f1ca commit b61c49d
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion R/prep_alignment_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion R/prep_exposures_scorecard.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion R/prep_fossil_bars.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion R/prep_green_brown_bars.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions R/prep_scatter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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") %>%
Expand Down
4 changes: 2 additions & 2 deletions R/prep_scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/prep_scores_scorecard.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions R/render_executive_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion data-raw/scenario_thresholds.R
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file modified data/scenario_thresholds.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/prep_alignment_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/prep_exposures_scorecard.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/prep_fossil_bars.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/prep_green_brown_bars.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/prep_scatter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/prep_scores.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/prep_scores_scorecard.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/render_executive_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/scenario_thresholds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b61c49d

Please sign in to comment.