Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
31 changes: 30 additions & 1 deletion R/calculate_report_content_variables.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ calculate_report_content_variables <-
function(audit_file,
investor_name = "Meta Investor",
portfolio_name = "Meta Portfolio",
currency_exchange_value) {
currency_exchange_value,
pacta_sectors) {
if (isFALSE(investor_name %in% audit_file$investor_name)) {
stop("`investor_name` is not found in `audit_file$investor_name`")
}
Expand Down Expand Up @@ -34,6 +35,32 @@ calculate_report_content_variables <-

total_portfolio_percentage_coverage <- (total_portfolio_percentage_equity + total_portfolio_percentage_bonds)

pacta_sectors_percent_total_value_equity <-
audit_file %>%
dplyr::filter(.data$valid_input == TRUE) %>%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

dplyr::filter(.data$asset_type == "Equity") %>%
dplyr::mutate(pacta_sector = .data$financial_sector %in% .env$pacta_sectors) %>%
dplyr::summarise(
value = sum(.data$value_usd, na.rm = TRUE) / .env$currency_exchange_value,
.by = "pacta_sector"
) %>%
dplyr::mutate(percent = .data$value / sum(.data$value)) %>%
dplyr::filter(.data$pacta_sector == TRUE) %>%
dplyr::pull("percent")

pacta_sectors_percent_total_value_bonds <-
audit_file %>%
dplyr::filter(.data$valid_input == TRUE) %>%
dplyr::filter(.data$asset_type == "Bonds") %>%
dplyr::mutate(pacta_sector = .data$financial_sector %in% .env$pacta_sectors) %>%
dplyr::summarise(
value = sum(.data$value_usd, na.rm = TRUE) / .env$currency_exchange_value,
.by = "pacta_sector"
) %>%
dplyr::mutate(percent = .data$value / sum(.data$value)) %>%
dplyr::filter(.data$pacta_sector == TRUE) %>%
dplyr::pull("percent")

results_absolute_value_equity <- audit_file %>%
filter(.data$asset_type == "Equity", .data$valid_input == TRUE) %>%
mutate(value_curr = .data$value_usd / .env$currency_exchange_value) %>%
Expand All @@ -55,6 +82,8 @@ calculate_report_content_variables <-
total_portfolio_percentage_bonds = sprintf("%.0f", 100 * total_portfolio_percentage_bonds),
total_portfolio_percentage_other_asset_classes = sprintf("%.0f", 100 * total_portfolio_percentage_other_asset_classes),
total_portfolio_percentage_coverage = sprintf("%.0f", 100 * total_portfolio_percentage_coverage),
pacta_sectors_percent_total_value_equity = sprintf("%.0f", 100 * pacta_sectors_percent_total_value_equity),
pacta_sectors_percent_total_value_bonds = sprintf("%.0f", 100 * pacta_sectors_percent_total_value_bonds),
results_absolute_value_equity = format(results_absolute_value_equity, big.mark = ","),
results_absolute_value_bonds = format(results_absolute_value_bonds, big.mark = ",")
)
Expand Down
3 changes: 2 additions & 1 deletion R/create_interactive_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ create_interactive_report <-
audit_file = audit_file,
investor_name = investor_name,
portfolio_name = portfolio_name,
currency_exchange_value = currency_exchange_value
currency_exchange_value = currency_exchange_value,
pacta_sectors = pacta_sectors
)

portfolio_parameters %>%
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/general_en_template/rmd/02-scope.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ For more information on asset class and sector coverage of PACTA analysis, pleas

As PACTA is a granular and forward looking climate alignment tool, it does not work based on "financed emissions" due to the lack of meaningful scenarios as well as data limitations in measuring these emissions. Nevertheless, estimating current CO2 emissions associated with a portfolio can be useful to inform about the relevance of each sector in the decarbonisation of the portfolio.

The following charts indicate the contribution of each of the sectors to the total emissions assigned to the equity and bond portfolio. Comparing these graphs to the graphs from the previous section emphasizes the importance of the analysed sectors in terms of climate relevance. While making up `r portfolio_parameters$total_portfolio_percentage_coverage`% of the portfolio value, by emissions the climate relevant sectors are responsible for the following share of the portfolios estimated CO2 emissions.
The charts below indicate the contribution of each of the sectors to the total emissions assigned to the equity and bond portfolio. Comparing these graphs to the graphs from the previous section emphasizes the importance of the analyzed sectors in terms of climate relevance. While making up `r portfolio_parameters$pacta_sectors_percent_total_value_equity`% of the equity portfolio value, and `r portfolio_parameters$pacta_sectors_percent_total_value_bonds`% of the corporate bond portfolio value, by emissions the PACTA sectors are responsible for the following share of the portfolio’s estimated absolute CO~2~ emissions:


<div id="emissions_pie_equity" class="has_optbar donotduplicate donotremove">
Expand Down
Loading