Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scenario used #325

Merged
merged 4 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
scenario_source = scenario_source
)

portfolio_data_asset <- results_portfolio %>%
portfolio_data_asset <- results_portfolio %>%

Check warning on line 34 in R/prep_scores.R

View check run for this annotation

Codecov / codecov/patch

R/prep_scores.R#L34

Added line #L34 was not covered by tests
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.
Loading