Skip to content

Commit 664fd21

Browse files
authored
add percent pacta sectors content values (#103)
1 parent 24221e7 commit 664fd21

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

R/calculate_report_content_variables.R

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ calculate_report_content_variables <-
22
function(audit_file,
33
investor_name = "Meta Investor",
44
portfolio_name = "Meta Portfolio",
5-
currency_exchange_value) {
5+
currency_exchange_value,
6+
pacta_sectors) {
67
if (isFALSE(investor_name %in% audit_file$investor_name)) {
78
stop("`investor_name` is not found in `audit_file$investor_name`")
89
}
@@ -34,6 +35,32 @@ calculate_report_content_variables <-
3435

3536
total_portfolio_percentage_coverage <- (total_portfolio_percentage_equity + total_portfolio_percentage_bonds)
3637

38+
pacta_sectors_percent_total_value_equity <-
39+
audit_file %>%
40+
dplyr::filter(.data$valid_input == TRUE) %>%
41+
dplyr::filter(.data$asset_type == "Equity") %>%
42+
dplyr::mutate(pacta_sector = .data$financial_sector %in% .env$pacta_sectors) %>%
43+
dplyr::summarise(
44+
value = sum(.data$value_usd, na.rm = TRUE) / .env$currency_exchange_value,
45+
.by = "pacta_sector"
46+
) %>%
47+
dplyr::mutate(percent = .data$value / sum(.data$value)) %>%
48+
dplyr::filter(.data$pacta_sector == TRUE) %>%
49+
dplyr::pull("percent")
50+
51+
pacta_sectors_percent_total_value_bonds <-
52+
audit_file %>%
53+
dplyr::filter(.data$valid_input == TRUE) %>%
54+
dplyr::filter(.data$asset_type == "Bonds") %>%
55+
dplyr::mutate(pacta_sector = .data$financial_sector %in% .env$pacta_sectors) %>%
56+
dplyr::summarise(
57+
value = sum(.data$value_usd, na.rm = TRUE) / .env$currency_exchange_value,
58+
.by = "pacta_sector"
59+
) %>%
60+
dplyr::mutate(percent = .data$value / sum(.data$value)) %>%
61+
dplyr::filter(.data$pacta_sector == TRUE) %>%
62+
dplyr::pull("percent")
63+
3764
results_absolute_value_equity <- audit_file %>%
3865
filter(.data$asset_type == "Equity", .data$valid_input == TRUE) %>%
3966
mutate(value_curr = .data$value_usd / .env$currency_exchange_value) %>%
@@ -55,6 +82,8 @@ calculate_report_content_variables <-
5582
total_portfolio_percentage_bonds = sprintf("%.0f", 100 * total_portfolio_percentage_bonds),
5683
total_portfolio_percentage_other_asset_classes = sprintf("%.0f", 100 * total_portfolio_percentage_other_asset_classes),
5784
total_portfolio_percentage_coverage = sprintf("%.0f", 100 * total_portfolio_percentage_coverage),
85+
pacta_sectors_percent_total_value_equity = sprintf("%.0f", 100 * pacta_sectors_percent_total_value_equity),
86+
pacta_sectors_percent_total_value_bonds = sprintf("%.0f", 100 * pacta_sectors_percent_total_value_bonds),
5887
results_absolute_value_equity = format(results_absolute_value_equity, big.mark = ","),
5988
results_absolute_value_bonds = format(results_absolute_value_bonds, big.mark = ",")
6089
)

R/create_interactive_report.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ create_interactive_report <-
139139
audit_file = audit_file,
140140
investor_name = investor_name,
141141
portfolio_name = portfolio_name,
142-
currency_exchange_value = currency_exchange_value
142+
currency_exchange_value = currency_exchange_value,
143+
pacta_sectors = pacta_sectors
143144
)
144145

145146
portfolio_parameters %>%

inst/templates/general_en_template/rmd/02-scope.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ For more information on asset class and sector coverage of PACTA analysis, pleas
6161

6262
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.
6363

64-
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.
64+
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:
6565

6666

6767
<div id="emissions_pie_equity" class="has_optbar donotduplicate donotremove">

0 commit comments

Comments
 (0)