diff --git a/.Rbuildignore b/.Rbuildignore index 91114bf..f38ee38 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,8 @@ ^.*\.Rproj$ +^.dockerignore$ +^.github/ +^.lintr$ +^Dockerfile$ +^LICENSE\.md$ ^\.Rproj\.user$ +^docker-compose.yml$ diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..23afe46 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,13 @@ +**/*.Rproj +**/*.md +**/.git +**/.github +**/.gitignore +**/Dockerfile +analysis_output_dir +analysis_output_dir/**/* +benchmarks_dir +benchmarks_dir/**/* +dashboard_data_dir +dashboard_data_dir/**/* +docker-compose.yml diff --git a/.github/workflows/R.yml b/.github/workflows/R.yml new file mode 100644 index 0000000..f146536 --- /dev/null +++ b/.github/workflows/R.yml @@ -0,0 +1,23 @@ +--- +# This example file will enable R language checks on push or PR to the main +# branch. +# It will also run the checks every weeknight at midnight UTC +# +# Note the @main in `uses:` on the last line. This will call the latest version +# of the workflow from the `main` brnach in the RMI-PACTA/actions repo. You can +# also specify a tag from that repo, or a commit SHA to pin action versions. +on: + pull_request: + push: + branches: [main] + schedule: + - cron: '0 0 * * 1,2,3,4,5' + workflow_dispatch: + +name: R + +jobs: + R-package: + name: R Package Checks + uses: RMI-PACTA/actions/.github/workflows/R.yml@main + secrets: inherit diff --git a/.gitignore b/.gitignore index 26300ec..82463ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .env .Rproj.user -inputs/ -outputs/ -data/ .Rhistory +analysis_output_dir/**/* +benchmarks_dir/**/* +dashboard_data_dir/**/* diff --git a/.lintr b/.lintr new file mode 100644 index 0000000..a645424 --- /dev/null +++ b/.lintr @@ -0,0 +1,12 @@ +linters: linters_with_defaults( + cyclocomp_linter = NULL, + line_length_linter = NULL, + indentation_linter = NULL, + object_usage_linter = NULL, + trailing_whitespace_linter = NULL, + object_length_linter = NULL, + assignment_linter = NULL, + commas_linter = NULL, + trailing_blank_lines_linter = NULL, + commented_code_linter = NULL + ) diff --git a/DESCRIPTION b/DESCRIPTION index 7d9b7e6..a84eb6b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,13 @@ Package: workflow.pacta.dashboard Title: Run PACTA dashboard JSON generation -Version: 0.0.0.9001 +Version: 0.0.0.9002 Authors@R: - c(person(given = "CJ", + c(person(given = "Alex", + family = "Axthelm", + role = c("aut", "cre", "ctr"), + email = "aaxthelm@rmi.org", + comment = c(ORCID = "0000-0001-8579-8565")), + person(given = "CJ", family = "Yetman", role = c("aut", "ctr"), email = "cj@cjyetman.com", @@ -22,10 +27,13 @@ Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Imports: dplyr, + glue, jsonlite, - pacta.portfolio.report, + magrittr, pacta.portfolio.utils, - readr + readr, + rlang, + stringr, + tidyr Remotes: - RMI-PACTA/pacta.portfolio.report, RMI-PACTA/pacta.portfolio.utils diff --git a/Dockerfile b/Dockerfile index 06fe2b8..2b68975 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rocker/r-ver:4.3.1 +FROM docker.io/rocker/r-ver:4.3.1 as base RUN CRAN_LIKE_URL="https://packagemanager.posit.co/cran/__linux__/jammy/2024-04-05"; \ echo "options(repos = c(CRAN = '$CRAN_LIKE_URL'))" \ @@ -19,8 +19,11 @@ COPY DESCRIPTION /workflow.pacta.dashboard/DESCRIPTION # install pak, find dependencises from DESCRIPTION, and install them. RUN Rscript -e "pak::local_install_deps('/workflow.pacta.dashboard')" -COPY main.R /workflow.pacta.dashboard/main.R +FROM base AS install-pacta -WORKDIR /workflow.pacta.dashboard +COPY . /workflow.pacta.dashboard/ -CMD ["Rscript", "--vanilla", "/workflow.pacta.dashboard/main.R"] +RUN Rscript -e "pak::local_install(root = '/workflow.pacta.dashboard')" + +# set default run behavior +ENTRYPOINT ["Rscript", "--vanilla", "/workflow.pacta.dashboard/inst/extdata/scripts/prepare_dashboard_data.R"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d3300dc --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2024 +COPYRIGHT HOLDER: workflow.pacta.dashboard authors diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9ca6849 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2024 workflow.pacta.dashboard authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..7334320 --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,39 @@ +# Generated by roxygen2: do not edit by hand + +importFrom(dplyr,across) +importFrom(dplyr,all_of) +importFrom(dplyr,arrange) +importFrom(dplyr,bind_rows) +importFrom(dplyr,case_when) +importFrom(dplyr,desc) +importFrom(dplyr,distinct) +importFrom(dplyr,everything) +importFrom(dplyr,filter) +importFrom(dplyr,first) +importFrom(dplyr,group_by) +importFrom(dplyr,if_else) +importFrom(dplyr,inner_join) +importFrom(dplyr,join_by) +importFrom(dplyr,lag) +importFrom(dplyr,last) +importFrom(dplyr,left_join) +importFrom(dplyr,mutate) +importFrom(dplyr,mutate_at) +importFrom(dplyr,n) +importFrom(dplyr,pull) +importFrom(dplyr,reframe) +importFrom(dplyr,rename) +importFrom(dplyr,row_number) +importFrom(dplyr,select) +importFrom(dplyr,slice) +importFrom(dplyr,summarise) +importFrom(dplyr,tibble) +importFrom(dplyr,transmute) +importFrom(dplyr,ungroup) +importFrom(magrittr,"%>%") +importFrom(rlang,":=") +importFrom(rlang,.data) +importFrom(rlang,.env) +importFrom(tidyr,pivot_longer) +importFrom(tidyr,pivot_wider) +importFrom(tidyr,unite) diff --git a/R/choose_dictionary_language.R b/R/choose_dictionary_language.R new file mode 100644 index 0000000..a5ee7c8 --- /dev/null +++ b/R/choose_dictionary_language.R @@ -0,0 +1,12 @@ +choose_dictionary_language <- + function(data, language) { + language <- tolower(language) + + data %>% + transmute( + .data$id_data, + .data$id_column, + translate_key = .data$key, + translate_value = .data[[language]] + ) + } diff --git a/R/filter_scenarios_per_sector.R b/R/filter_scenarios_per_sector.R new file mode 100644 index 0000000..2608c0c --- /dev/null +++ b/R/filter_scenarios_per_sector.R @@ -0,0 +1,12 @@ +filter_scenarios_per_sector <- + function(data, select_scenario_other, select_scenario) { + special_sectors <- c("Aviation") + rest_of_sectors <- setdiff(unique(data$ald_sector), special_sectors) + + data %>% + filter( + scenarios_found_in_sectors(.data, select_scenario_other, c("Aviation")) | + scenarios_found_in_sectors(.data, select_scenario, rest_of_sectors) + ) + } + diff --git a/R/get_scenario.R b/R/get_scenario.R new file mode 100644 index 0000000..be60d10 --- /dev/null +++ b/R/get_scenario.R @@ -0,0 +1,4 @@ +get_scenario <- function(scenario_parameter) { + scenario <- unlist(stringr::str_split(scenario_parameter,"_", n = 2))[2] + scenario +} diff --git a/R/get_scenario_source.R b/R/get_scenario_source.R new file mode 100644 index 0000000..e153edd --- /dev/null +++ b/R/get_scenario_source.R @@ -0,0 +1,4 @@ +get_scenario_source <- function(scenario_parameter) { + source <- unlist(stringr::str_split(scenario_parameter,"_", n = 2))[1] + source +} diff --git a/R/prep_audit_table.R b/R/prep_audit_table.R new file mode 100644 index 0000000..4bc2a18 --- /dev/null +++ b/R/prep_audit_table.R @@ -0,0 +1,127 @@ +prep_audit_table <- + function(audit_file, investor_name, portfolio_name, currency_exchange_value) { + sort_order <- c( + "Bonds", + "Equity", + "Other", + "Unclassified" + ) + + audit_table_init <- + audit_file %>% + filter( + .data$investor_name == .env$investor_name, + .data$portfolio_name == .env$portfolio_name + ) %>% + mutate(asset_type = if_else( + .data$valid_input, .data$asset_type, "Unknown" + )) %>% + mutate(is_included = if_else( + .data$asset_type %in% c("Others", "Funds"), FALSE, .data$valid_input + )) %>% + mutate(included = if_else(.data$is_included, "Yes", "No")) %>% + mutate(asset_type_analysis = case_when( + .data$asset_type %in% c("Bonds", "Equity") ~ .data$asset_type, + .data$asset_type == "Others" ~ "Other", + (.data$asset_type == "Funds") & (.data$direct_holding) ~ "Other", + TRUE ~ "Unclassified" + )) %>% + mutate( + asset_type_analysis = + factor(.data$asset_type_analysis, levels = .env$sort_order) + ) %>% + mutate(value_usd = if_else(.data$value_usd < 0, 0, .data$value_usd)) %>% + mutate(value_usd = .data$value_usd / .env$currency_exchange_value) + + included_table_totals <- + audit_table_init %>% + group_by(.data$asset_type_analysis, .data$included) %>% + summarise( + total_value_invested = sum(.data$value_usd, na.rm = TRUE), + .groups = "drop" + ) %>% + mutate( + percentage_value_invested = + .data$total_value_invested / sum(.data$total_value_invested) + ) + + included_table_value_breakdown <- + audit_table_init %>% + mutate(investment_means = case_when( + (.data$asset_type == "Funds") & (.data$direct_holding) ~ "Unidentified Funds", + .data$direct_holding ~ "Direct", + !.data$direct_holding ~ "Via a Fund" + )) %>% + group_by(.data$asset_type_analysis, .data$investment_means) %>% + summarise( + value_invested = sum(.data$value_usd, na.rm = TRUE), + .groups = "drop" + ) + + fields_totals <- + c( + "asset_type_analysis", + "included", + "total_value_invested", + "percentage_value_invested" + ) + + included_table_per_asset <- + included_table_totals %>% + left_join(included_table_value_breakdown, by = "asset_type_analysis") %>% + remove_duplicate_entries_totals(fields_totals) %>% + select( + "asset_type_analysis", + "total_value_invested", + "percentage_value_invested", + "included", + "value_invested", + "investment_means" + ) + + sum_table <- + included_table_per_asset %>% + summarise( + asset_type_analysis = "Total", + total_value_invested = sum(.data$total_value_invested, na.rm = TRUE), + percentage_value_invested = sum(.data$percentage_value_invested, na.rm = TRUE), + included = NA, + value_invested = sum(.data$value_invested, na.rm = TRUE), + investment_means = NA + ) + + bind_rows(included_table_per_asset, sum_table) + } + + +equal_adjacent_fields_totals <- + function(table, fields_totals, idx) { + are_equal <- TRUE + for (field in fields_totals) { + are_equal <- are_equal && + (pull(slice(table, idx - 1), field) == pull(slice(table, idx), field)) + } + are_equal + } + + +remove_duplicate_entries_totals <- + function(table, fields_totals) { + for (asset in unique(table$asset_type_analysis)) { + idx_asset <- + table %>% + mutate(is_chosen_asset = .data$asset_type_analysis == .env$asset) %>% + pull(.data$is_chosen_asset) %>% + which() + + if (length(idx_asset) >= 2) { + for (i in length(idx_asset):2) { + idx <- idx_asset[i] + if (equal_adjacent_fields_totals(table, fields_totals, idx)) { + table[idx, fields_totals] <- NA + } + } + } + } + table + } diff --git a/R/prep_company_bubble.R b/R/prep_company_bubble.R new file mode 100644 index 0000000..947f966 --- /dev/null +++ b/R/prep_company_bubble.R @@ -0,0 +1,73 @@ +# prep_company_bubble ---------------------------------------------------------- +# based on pacta.portfolio.report:::prep_company_bubble, but does not filter to +# allocation == "portfolio_weight" nor by scenario and scenario source +prep_company_bubble <- + function(equity_results_company, + bonds_results_company, + portfolio_name, + start_year, + green_techs) { + + equity_data <- + equity_results_company %>% + filter(.data$portfolio_name == .env$portfolio_name) %>% + filter(.data$ald_sector %in% c("Power", "Automotive")) %>% + filter(.data$equity_market == "GlobalMarket") %>% + filter(.data$scenario_geography == "Global") %>% + filter(.data$year %in% c(.env$start_year, .env$start_year + 5)) %>% + mutate( + plan_buildout = last(.data$plan_tech_prod, order_by = .data$year) - first(.data$plan_tech_prod, order_by = .data$year), + scen_buildout = last(.data$scen_tech_prod, order_by = .data$year) - first(.data$scen_tech_prod, order_by = .data$year), + .by = c("company_name", "technology", "scenario_source", "scenario", "allocation") + ) %>% + filter(.data$year == .env$start_year) %>% + mutate(green = .data$technology %in% .env$green_techs) %>% + reframe( + plan_tech_share = sum(.data$plan_tech_share, na.rm = TRUE), + plan_buildout = sum(.data$plan_buildout, na.rm = TRUE), + scen_buildout = sum(.data$scen_buildout, na.rm = TRUE), + plan_carsten = sum(.data$plan_carsten, na.rm = TRUE), + port_weight = unique(.data$port_weight), + .by = c("company_name", "allocation", "scenario_source", + "scenario", "ald_sector", "green", "year") + ) %>% + mutate(y = .data$plan_buildout / .data$scen_buildout) %>% + filter(.data$green) %>% + select(-"plan_buildout", -"scen_buildout", -"green") %>% + filter(!is.na(.data$plan_tech_share)) %>% + mutate(y = pmax(.data$y, 0, na.rm = TRUE)) %>% + mutate(asset_class = "Listed Equity") + + bonds_data <- + bonds_results_company %>% + filter(.data$portfolio_name == .env$portfolio_name) %>% + filter(.data$ald_sector %in% c("Power", "Automotive")) %>% + filter(.data$equity_market == "GlobalMarket") %>% + filter(.data$scenario_geography == "Global") %>% + filter(.data$year %in% c(.env$start_year, .env$start_year + 5)) %>% + mutate( + plan_buildout = last(.data$plan_tech_prod, order_by = .data$year) - first(.data$plan_tech_prod, order_by = .data$year), + scen_buildout = last(.data$scen_tech_prod, order_by = .data$year) - first(.data$scen_tech_prod, order_by = .data$year), + .by = c("company_name", "technology", "scenario_source", "scenario", "allocation") + ) %>% + filter(.data$year == .env$start_year) %>% + mutate(green = .data$technology %in% .env$green_techs) %>% + reframe( + plan_tech_share = sum(.data$plan_tech_share, na.rm = TRUE), + plan_buildout = sum(.data$plan_buildout, na.rm = TRUE), + scen_buildout = sum(.data$scen_buildout, na.rm = TRUE), + plan_carsten = sum(.data$plan_carsten, na.rm = TRUE), + port_weight = unique(.data$port_weight), + .by = c("company_name", "allocation", "scenario_source", + "scenario", "ald_sector", "green", "year") + ) %>% + mutate(y = .data$plan_buildout / .data$scen_buildout) %>% + filter(.data$green) %>% + select(-"plan_buildout", -"scen_buildout", -"green") %>% + filter(!is.na(.data$plan_tech_share)) %>% + mutate(y = pmax(.data$y, 0, na.rm = TRUE)) %>% + mutate(asset_class = "Corporate Bonds") + + bind_rows(equity_data, bonds_data) + } + diff --git a/R/prep_emissions_pie.R b/R/prep_emissions_pie.R new file mode 100644 index 0000000..52b9c2b --- /dev/null +++ b/R/prep_emissions_pie.R @@ -0,0 +1,15 @@ +prep_emissions_pie <- + function(data, asset_type, investor_name, portfolio_name, pacta_sectors) { + data %>% + ungroup() %>% + filter(.data$investor_name == .env$investor_name & + .data$portfolio_name == .env$portfolio_name) %>% + filter(.data$asset_type %in% c("Bonds", "Equity")) %>% + select("asset_type", "sector", "weighted_sector_emissions") %>% + mutate(exploded = .data$sector %in% .env$pacta_sectors) %>% + arrange(.data$asset_type, desc(.data$exploded), .data$sector) %>% + rename(key = .data$sector, value = .data$weighted_sector_emissions) %>% + filter(!is.na(.data$key)) %>% + filter(.data$asset_type == .env$asset_type) %>% + select(-"asset_type") + } diff --git a/R/prep_emissions_trajectory.R b/R/prep_emissions_trajectory.R new file mode 100644 index 0000000..2c34d6e --- /dev/null +++ b/R/prep_emissions_trajectory.R @@ -0,0 +1,52 @@ +prep_emissions_trajectory <- + function(equity_results_portfolio, + bonds_results_portfolio, + investor_name, + portfolio_name, + select_scenario_other, + select_scenario, + pacta_sectors, + year_span, + start_year + ) { + emissions_units <- + c( + Automotive = "tons of CO\U00002082 per km per cars produced", + Aviation = "tons of CO\U00002082 per passenger km per active planes", + Cement = "tons of CO\U00002082 per tons of cement", + Coal = "tons of CO\U00002082 per tons of coal", + `Oil&Gas` = "tons of CO\U00002082 per GJ", + Power = "tons of CO\U00002082 per MWh", + Steel = "tons of CO\U00002082 per tons of steel" + ) + + list(`Listed Equity` = equity_results_portfolio, + `Corporate Bonds` = bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$investor_name == .env$investor_name, + .data$portfolio_name == .env$portfolio_name) %>% + filter_scenarios_per_sector( + select_scenario_other, + select_scenario + ) %>% + filter(.data$scenario_geography == "Global") %>% + select("asset_class", "allocation", "equity_market", sector = "ald_sector", "year", + plan = "plan_sec_emissions_factor", scen = "scen_sec_emissions_factor", "scenario") %>% + distinct() %>% + filter(!is.nan(.data$plan)) %>% + pivot_longer(c("plan", "scen"), names_to = "plan") %>% + unite("name", "sector", "plan", remove = FALSE) %>% + mutate(disabled = !.data$sector %in% .env$pacta_sectors) %>% + mutate(unit = .env$emissions_units[.data$sector]) %>% + group_by(.data$asset_class) %>% + filter(!all(.data$disabled)) %>% + mutate(equity_market = case_when( + .data$equity_market == "GlobalMarket" ~ "Global Market", + .data$equity_market == "DevelopedMarket" ~ "Developed Market", + .data$equity_market == "EmergingMarket" ~ "Emerging Market", + TRUE ~ .data$equity_market) + ) %>% + filter(.data$year <= .env$start_year + .env$year_span) %>% + arrange(.data$asset_class, factor(.data$equity_market, levels = c("Global Market", "Developed Market", "Emerging Market"))) %>% + ungroup() + } diff --git a/R/prep_exposure_pie.R b/R/prep_exposure_pie.R new file mode 100644 index 0000000..e2f37dd --- /dev/null +++ b/R/prep_exposure_pie.R @@ -0,0 +1,33 @@ +prep_exposure_pie <- + function(data, + asset_type, + investor_name, + portfolio_name, + pacta_sectors, + currency_exchange_value) { + data %>% + filter(.data$investor_name == .env$investor_name & + .data$portfolio_name == .env$portfolio_name) %>% + filter(.data$asset_type %in% c("Bonds", "Equity")) %>% + filter(.data$valid_input == TRUE) %>% + mutate(across(c("bics_sector", "financial_sector"), as.character)) %>% + mutate( + sector = + if_else(!.data$financial_sector %in% .env$pacta_sectors, + "Other", + .data$financial_sector + ) + ) %>% + group_by(.data$asset_type, .data$sector) %>% + summarise( + value = sum(.data$value_usd, na.rm = TRUE) / .env$currency_exchange_value, + .groups = "drop" + ) %>% + mutate(exploded = .data$sector %in% .env$pacta_sectors) %>% + arrange(.data$asset_type, desc(.data$exploded), .data$sector) %>% + rename(key = .data$sector) %>% + filter(!is.na(.data$key)) %>% + ungroup() %>% + filter(.data$asset_type == .env$asset_type) %>% + select(-"asset_type") + } diff --git a/R/prep_exposure_stats.R b/R/prep_exposure_stats.R new file mode 100644 index 0000000..a1be5f4 --- /dev/null +++ b/R/prep_exposure_stats.R @@ -0,0 +1,65 @@ +prep_exposure_stats <- function(audit_file, investor_name, portfolio_name, pacta_sectors, currency_exchange_value) { + pacta_asset_classes <- c("Bonds", "Equity") + + audit_table <- prep_audit_table( + audit_file, + investor_name = investor_name, + portfolio_name = portfolio_name, + currency_exchange_value = currency_exchange_value + ) + + exposure_stats <- audit_file %>% + filter( + .data$investor_name == .env$investor_name & + .data$portfolio_name == .env$portfolio_name) %>% + filter(.data$asset_type %in% pacta_asset_classes) %>% + filter(.data$valid_input == TRUE) %>% + mutate(across(c("bics_sector", "financial_sector"), as.character)) %>% + mutate( + sector = + if_else(!.data$financial_sector %in% .env$pacta_sectors, + "Other", + .data$financial_sector + ) + ) %>% + summarise( + value = sum(.data$value_usd, na.rm = TRUE) / .env$currency_exchange_value, + .by = c("asset_type", "sector") + ) %>% + mutate( + perc_asset_val_sector = .data$value / sum(.data$value, na.rm = TRUE), + .by = c("asset_type") + ) %>% + inner_join(audit_table, by = join_by("asset_type" == "asset_type_analysis")) %>% + select("asset_type", "percentage_value_invested", "sector", "perc_asset_val_sector") + + asset_classes_in_portfolio <- intersect(pacta_asset_classes, unique(exposure_stats$asset_type)) + + all_stats_with_zero_sector_exposure <- expand.grid( + asset_type = asset_classes_in_portfolio, + sector = pacta_sectors, + val_sector = 0 + ) %>% inner_join( + distinct(select(exposure_stats, c("asset_type", "percentage_value_invested"))), + by = join_by("asset_type") + ) + + exposure_stats_all <- all_stats_with_zero_sector_exposure %>% + left_join(exposure_stats, by = join_by("asset_type", "sector", "percentage_value_invested")) %>% + mutate( + perc_asset_val_sector = if_else( + is.na(.data$perc_asset_val_sector), + .data$val_sector, + .data$perc_asset_val_sector + ) + ) %>% + mutate( + asset_type = case_when( + .data$asset_type == "Bonds" ~ "Corporate Bonds", + .data$asset_type == "Equity" ~ "Listed Equity" + ) + ) %>% + select("asset_type", "percentage_value_invested", "sector", "perc_asset_val_sector") + + exposure_stats_all +} diff --git a/R/prep_key_bars_company.R b/R/prep_key_bars_company.R new file mode 100644 index 0000000..7000b09 --- /dev/null +++ b/R/prep_key_bars_company.R @@ -0,0 +1,63 @@ +# prep_key_bars_company -------------------------------------------------------- +# based on pacta.portfolio.report:::prep_key_bars_company, but does not filter +# to allocation == "portfolio_weight" nor by scenario and scenario source + +prep_key_bars_company <- + function(equity_results_company, + bonds_results_company, + portfolio_name, + start_year, + pacta_sectors_not_analysed, + all_tech_levels) { + + equity_data_company <- + equity_results_company %>% + filter(.data$portfolio_name == .env$portfolio_name) %>% + filter(.data$year %in% c(.env$start_year + 5)) %>% + filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% + filter(.data$scenario_geography == "Global") %>% + filter(.data$ald_sector %in% c("Power", "Automotive")) %>% + select(-"id") %>% + rename(id = "company_name") %>% + select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", + "allocation", "scenario_source", "scenario", "year") %>% + arrange(desc(.data$port_weight)) %>% + mutate(asset_class = "Listed Equity") %>% + mutate_at("id", as.character) %>% # convert the col type to character to prevent errors in case empty df is binded by rows + group_by(.data$ald_sector, .data$technology) %>% # select at most 15 companies with the highest weigths per sector+technology + arrange(dplyr::desc(.data$port_weight), .by_group = TRUE) %>% + slice(1:15) %>% + filter(!is.null(.data$port_weight)) %>% + filter(!is.null(.data$plan_tech_share)) + + bonds_data_company <- + bonds_results_company %>% + filter(.data$portfolio_name == .env$portfolio_name) %>% + filter(.data$year %in% c(.env$start_year + 5)) %>% + filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% + filter(.data$scenario_geography == "Global") %>% + filter(.data$ald_sector %in% c("Power", "Automotive")) %>% + select(-"id") %>% + rename(id = "company_name") %>% + select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", + "allocation", "scenario_source", "scenario", "year") %>% + group_by(.data$id, .data$ald_sector, .data$technology) %>% + mutate(port_weight = sum(.data$port_weight, na.rm = TRUE)) %>% + group_by(.data$id, .data$technology) %>% + filter(row_number() == 1) %>% + filter(!.data$ald_sector %in% .env$pacta_sectors_not_analysed | !grepl("Aligned", .data$id)) %>% + arrange(desc(.data$port_weight)) %>% + mutate(asset_class = "Corporate Bonds") %>% + mutate_at("id", as.character) %>% # convert the col type to character to prevent errors in case empty df is bound by rows + group_by(.data$ald_sector, .data$technology) %>% # select at most 15 companies with the highest weigths per sector+technology + arrange(.data$port_weight, .by_group = TRUE) %>% + slice(1:15) %>% + group_by(.data$ald_sector) %>% + arrange(factor(.data$technology, levels = .env$all_tech_levels)) %>% + arrange(dplyr::desc(.data$port_weight), .by_group = TRUE) %>% + filter(!is.null(.data$port_weight)) %>% + filter(!is.null(.data$plan_tech_share)) + + bind_rows(equity_data_company, bonds_data_company) + } + diff --git a/R/prep_key_bars_portfolio.R b/R/prep_key_bars_portfolio.R new file mode 100644 index 0000000..8e85d89 --- /dev/null +++ b/R/prep_key_bars_portfolio.R @@ -0,0 +1,52 @@ +# prep_key_bars_portfolio ------------------------------------------------------ +# based on pacta.portfolio.report:::prep_key_bars_portfolio, but does not filter +# to allocation == "portfolio_weight" nor by scenario and scenario source + +prep_key_bars_portfolio <- + function(equity_results_portfolio, + bonds_results_portfolio, + portfolio_name, + start_year, + pacta_sectors_not_analysed, + all_tech_levels) { + equity_data_portfolio <- + equity_results_portfolio %>% + filter(.data$portfolio_name == .env$portfolio_name) %>% + filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% + filter(.data$year %in% c(.env$start_year + 5)) %>% + filter(.data$ald_sector %in% c("Power", "Automotive")) %>% + filter(.data$scenario_geography == "Global") %>% + mutate(port_weight = 1) %>% + select("ald_sector", "technology", "plan_tech_share", "scen_tech_share", + "port_weight", "scenario", "scenario_source", "allocation", "year") %>% + pivot_longer(c("plan_tech_share", "scen_tech_share"), names_to = "plan") %>% + mutate(id = if_else(.data$plan == "plan_tech_share", "Portfolio", "Aligned* Portfolio")) %>% + rename(plan_tech_share = "value") %>% + select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", + "scenario", "scenario_source", "allocation", "year") %>% + filter(!.data$ald_sector %in% .env$pacta_sectors_not_analysed | !grepl("Aligned", .data$id)) %>% + mutate(asset_class = "Listed Equity") %>% + mutate_at("id", as.character) # convert the col type to character to prevent errors in case empty df is bound by rows + + bonds_data_portfolio <- + bonds_results_portfolio %>% + filter(.data$portfolio_name == .env$portfolio_name) %>% + filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% + filter(.data$year %in% c(.env$start_year + 5)) %>% + filter(.data$ald_sector %in% c("Power", "Automotive")) %>% + filter(.data$scenario_geography == "Global") %>% + mutate(port_weight = 1) %>% + select("ald_sector", "technology", "plan_tech_share", "scen_tech_share", + "port_weight", "scenario", "scenario_source", "allocation", "year") %>% + pivot_longer(c("plan_tech_share", "scen_tech_share"), names_to = "plan") %>% + mutate(id = if_else(.data$plan == "plan_tech_share", "Portfolio", "Aligned* Portfolio")) %>% + rename(plan_tech_share = "value") %>% + select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", + "scenario", "scenario_source", "allocation", "year") %>% + mutate(asset_class = "Corporate Bonds") %>% + mutate_at("id", as.character) %>% + arrange(factor(.data$technology, levels = .env$all_tech_levels)) + + bind_rows(equity_data_portfolio, bonds_data_portfolio) + } + diff --git a/R/prep_techexposure.R b/R/prep_techexposure.R new file mode 100644 index 0000000..37d2f34 --- /dev/null +++ b/R/prep_techexposure.R @@ -0,0 +1,97 @@ +prep_techexposure <- + function( + equity_results_portfolio, + bonds_results_portfolio, + investor_name, + portfolio_name, + indices_equity_results_portfolio, + indices_bonds_results_portfolio, + peers_equity_results_portfolio, + peers_bonds_results_portfolio, + peer_group, + select_scenario_other, + select_scenario, + start_year, + green_techs, + equity_market_levels, + all_tech_levels + ) { + portfolio <- + list(`Listed Equity` = equity_results_portfolio, + `Corporate Bonds` = bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$investor_name == .env$investor_name, + .data$portfolio_name == .env$portfolio_name) %>% + filter(!is.na(.data$ald_sector)) + + asset_classes <- + portfolio %>% + pull("asset_class") %>% + unique() + + equity_sectors <- + portfolio %>% + filter(.data$asset_class == "Listed Equity") %>% + pull("ald_sector") %>% + unique() + + bonds_sectors <- + portfolio %>% + filter(.data$asset_class == "Corporate Bonds") %>% + pull("ald_sector") %>% + unique() + + indices <- + list(`Listed Equity` = indices_equity_results_portfolio, + `Corporate Bonds` = indices_bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$asset_class %in% .env$asset_classes) %>% + filter(.data$asset_class == "Listed Equity" & .data$ald_sector %in% .env$equity_sectors | + .data$asset_class == "Corporate Bonds" & .data$ald_sector %in% .env$bonds_sectors) + + peers <- + list(`Listed Equity` = peers_equity_results_portfolio, + `Corporate Bonds` = peers_bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$asset_class %in% .env$asset_classes) %>% + filter(.data$asset_class == "Listed Equity" & .data$ald_sector %in% .env$equity_sectors | + .data$asset_class == "Corporate Bonds" & .data$ald_sector %in% .env$bonds_sectors) %>% + filter(.data$investor_name == .env$peer_group) + + bind_rows(portfolio, peers, indices) %>% + filter(.data$allocation == "portfolio_weight") %>% + filter_scenarios_per_sector( + select_scenario_other, + select_scenario + ) %>% + filter(.data$scenario_geography == "Global") %>% + filter(.data$year == .env$start_year) %>% + filter(.data$equity_market == "GlobalMarket") %>% + mutate(green = .data$technology %in% .env$green_techs) %>% + group_by(.data$asset_class, .data$equity_market, .data$portfolio_name, .data$ald_sector) %>% + arrange(.data$asset_class, .data$portfolio_name, + factor(.data$technology, levels = all_tech_levels), desc(.data$green)) %>% + mutate(sector_sum = sum(.data$plan_carsten)) %>% + mutate(sector_prcnt = .data$plan_carsten / sum(.data$plan_carsten)) %>% + mutate(sector_cumprcnt = cumsum(.data$sector_prcnt)) %>% + mutate(sector_cumprcnt = lag(.data$sector_cumprcnt, default = 0)) %>% + mutate(cumsum = cumsum(.data$plan_carsten)) %>% + mutate(cumsum = lag(.data$cumsum, default = 0)) %>% + ungroup() %>% + group_by(.data$asset_class, .data$equity_market, .data$portfolio_name, .data$ald_sector, .data$green) %>% + mutate(green_sum = sum(.data$plan_carsten)) %>% + mutate(green_prcnt = sum(.data$plan_carsten) / .data$sector_sum) %>% + ungroup() %>% + mutate(this_portfolio = .data$portfolio_name == .env$portfolio_name) %>% + mutate(equity_market = case_when( + .data$equity_market == "GlobalMarket" ~ "Global Market", + .data$equity_market == "DevelopedMarket" ~ "Developed Market", + .data$equity_market == "EmergingMarket" ~ "Emerging Market", + TRUE ~ .data$equity_market) + ) %>% + arrange(.data$asset_class, factor(.data$equity_market, levels = equity_market_levels), desc(.data$this_portfolio), .data$portfolio_name, + factor(.data$technology, levels = all_tech_levels), desc(.data$green)) %>% + select("asset_class", "equity_market", "portfolio_name", "this_portfolio", "ald_sector", "technology", + "plan_carsten", "sector_sum", "sector_prcnt", "cumsum", "sector_cumprcnt", + "green", "green_sum", "green_prcnt") + } diff --git a/R/prep_techmix_sector.R b/R/prep_techmix_sector.R new file mode 100644 index 0000000..66217fd --- /dev/null +++ b/R/prep_techmix_sector.R @@ -0,0 +1,131 @@ +prep_techmix_sector <- + function(equity_results_portfolio, + bonds_results_portfolio, + indices_equity_results_portfolio, + indices_bonds_results_portfolio, + peers_equity_results_portfolio, + peers_bonds_results_portfolio, + investor_name, + portfolio_name, + start_year, + year_span, + peer_group, + green_techs, + all_tech_levels + ) { + + portfolio <- + list(`Listed Equity` = equity_results_portfolio, + `Corporate Bonds` = bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$investor_name == .env$investor_name, + .data$portfolio_name == .env$portfolio_name) %>% + filter(!is.na(.data$ald_sector)) + +asset_classes <- + portfolio %>% + pull("asset_class") %>% + unique() + +equity_sectors <- + portfolio %>% + filter(.data$asset_class == "Listed Equity") %>% + filter(.data$allocation == "portfolio_weight") %>% + pull("ald_sector") %>% + unique() + +bonds_sectors <- + portfolio %>% + filter(.data$asset_class == "Corporate Bonds") %>% + pull("ald_sector") %>% + unique() + +indices <- + list(`Listed Equity` = indices_equity_results_portfolio, + `Corporate Bonds` = indices_bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$asset_class %in% .env$asset_classes) %>% + filter(.data$asset_class == "Listed Equity" & .data$ald_sector %in% .env$equity_sectors | + .data$asset_class == "Corporate Bonds" & .data$ald_sector %in% .env$bonds_sectors) + +peers <- + list(`Listed Equity` = peers_equity_results_portfolio, + `Corporate Bonds` = peers_bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$asset_class %in% .env$asset_classes) %>% + filter(.data$asset_class == "Listed Equity" & .data$ald_sector %in% .env$equity_sectors | + .data$asset_class == "Corporate Bonds" & .data$ald_sector %in% .env$bonds_sectors) %>% + filter(.data$investor_name == .env$peer_group) + +techexposure_data <- + bind_rows(portfolio, peers, indices) %>% + filter(.data$allocation == "portfolio_weight") %>% + filter(.data$scenario_geography == "Global") %>% + filter(.data$year %in% c(.env$start_year, .env$start_year + .env$year_span)) + +if (nrow(techexposure_data) > 0) { + techexposure_data <- + techexposure_data %>% + mutate(green = .data$technology %in% .env$green_techs) %>% + group_by(.data$asset_class, .data$equity_market, .data$portfolio_name, + .data$ald_sector, .data$scenario, .data$year) %>% + mutate(plan_alloc_wt_sec_prod = sum(.data$plan_alloc_wt_tech_prod), + scen_alloc_wt_sec_prod = sum(.data$scen_alloc_wt_tech_prod)) %>% + mutate(production_plan = if_else(.data$plan_alloc_wt_tech_prod > 0, .data$plan_alloc_wt_tech_prod / .data$plan_alloc_wt_sec_prod, 0), + scenario_plan = if_else(.data$scen_alloc_wt_tech_prod > 0, .data$scen_alloc_wt_tech_prod / .data$scen_alloc_wt_sec_prod, 0)) %>% + group_by(.data$asset_class, .data$equity_market, .data$portfolio_name, + .data$ald_sector, .data$scenario, .data$year, .data$green) %>% + mutate(green_sum_prod = sum(.data$production_plan), + green_sum_scenario = sum(.data$scenario_plan)) %>% + ungroup() %>% + select("asset_class", "investor_name", "portfolio_name", "scenario_source", + "scenario", "allocation", "equity_market", "year", "ald_sector", + "technology", "production_plan", "scenario_plan", "green", + "green_sum_prod", "green_sum_scenario") %>% + pivot_longer( + cols = -c("asset_class", "investor_name", "portfolio_name", "scenario_source", + "scenario", "allocation", "equity_market", "year", "ald_sector", + "technology", "green","green_sum_prod", "green_sum_scenario"), + names_to = "val_type", values_to = "value") %>% + mutate( + green_sum = if_else(.data$val_type == "production_plan", .data$green_sum_prod, .data$green_sum_scenario) + ) %>% + select(-c("green_sum_prod", "green_sum_scenario")) %>% + ungroup() %>% + mutate(this_portfolio = .data$portfolio_name == .env$portfolio_name, + val_type = if_else(.data$this_portfolio == TRUE, paste0(.data$val_type, "_portfolio"), paste0(.data$val_type, "_benchmark"))) %>% + mutate(equity_market = case_when( + .data$equity_market == "GlobalMarket" ~ "Global Market", + .data$equity_market == "DevelopedMarket" ~ "Developed Market", + .data$equity_market == "EmergingMarket" ~ "Emerging Market", + TRUE ~ .data$equity_market) + ) %>% + # no need for showing scenario mix for the benchmark + filter( + .data$val_type != "scenario_plan_benchmark" + ) %>% + mutate(val_type = case_when( + .data$val_type == "production_plan_portfolio" ~ "Portfolio", + .data$val_type == "scenario_plan_portfolio" ~ "Scenario", + .data$val_type == "production_plan_benchmark" ~ "Benchmark", + TRUE ~ .data$val_type) + ) %>% + arrange( + .data$asset_class, + factor(.data$equity_market, levels = c("Global Market", "Developed Market", "Emerging Market")), + desc(.data$this_portfolio), + factor(.data$val_type, levels = c("Portfolio", "Scenario", "Benchmark")), + .data$portfolio_name, + factor(.data$technology, levels = .env$all_tech_levels) + ) %>% + select("asset_class", "equity_market", "portfolio_name", "scenario", "scenario_source", + "this_portfolio", "val_type", "ald_sector", "technology", "value", + "green", "green_sum", "year") %>% + filter( + !(.data$year == .env$start_year & .data$val_type == "Scenario") + ) +} + +techexposure_data + } + diff --git a/R/prep_trajectory_alignment.R b/R/prep_trajectory_alignment.R new file mode 100644 index 0000000..3074e24 --- /dev/null +++ b/R/prep_trajectory_alignment.R @@ -0,0 +1,146 @@ +prep_trajectory_alignment <- + function(equity_results_portfolio, + bonds_results_portfolio, + peers_equity_results_portfolio, + peers_bonds_results_portfolio, + indices_equity_results_portfolio, + indices_bonds_results_portfolio, + investor_name, + portfolio_name, + tech_roadmap_sectors, + peer_group, + start_year, + year_span, + scen_geo_levels, + all_tech_levels) { + + portfolio <- + list(`Listed Equity` = equity_results_portfolio, + `Corporate Bonds` = bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$investor_name == .env$investor_name, + .data$portfolio_name == .env$portfolio_name) %>% + filter(.data$ald_sector %in% .env$tech_roadmap_sectors) %>% + filter(.data$scenario_geography != "GlobalAggregate") %>% + group_by(.data$asset_class, + .data$allocation, + .data$equity_market, + .data$technology, + .data$scenario) %>% + filter(n() > 1) %>% + ungroup() + + asset_classes <- + portfolio %>% + pull("asset_class") %>% + unique() + + equity_markets <- + portfolio %>% + filter(.data$asset_class == "Listed Equity") %>% + pull("equity_market") %>% + unique() + + bonds_markets <- + portfolio %>% + filter(.data$asset_class == "Corporate Bonds") %>% + pull("equity_market") %>% + unique() + + equity_techs <- + portfolio %>% + filter(.data$asset_class == "Listed Equity") %>% + pull("technology") %>% + unique() + + equity_scenario_geography <- + portfolio %>% + filter(.data$asset_class == "Listed Equity") %>% + pull("scenario_geography") %>% + unique() + + bonds_scenario_geography <- + portfolio %>% + filter(.data$asset_class == "Corporate Bonds") %>% + pull("scenario_geography") %>% + unique() + + bonds_techs <- + portfolio %>% + filter(.data$asset_class == "Corporate Bonds") %>% + pull("technology") %>% + unique() + + peers <- + list(`Listed Equity` = peers_equity_results_portfolio, + `Corporate Bonds` = peers_bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$ald_sector %in% .env$tech_roadmap_sectors) %>% + filter(.data$scenario_geography != "GlobalAggregate") %>% + filter(.data$asset_class %in% .env$asset_classes) %>% + filter(.data$asset_class == "Listed Equity" & .data$equity_market %in% .env$equity_markets | + .data$asset_class == "Corporate Bonds" & .data$equity_market %in% .env$bonds_markets) %>% + filter(.data$asset_class == "Listed Equity" & .data$technology %in% .env$equity_techs | + .data$asset_class == "Corporate Bonds" & .data$technology %in% .env$bonds_techs) %>% + filter(.data$asset_class == "Listed Equity" & .data$scenario_geography %in% .env$equity_scenario_geography | + .data$asset_class == "Corporate Bonds" & .data$scenario_geography %in% .env$bonds_scenario_geography) %>% + filter(.data$investor_name == .env$peer_group) + + indices <- + list(`Listed Equity` = indices_equity_results_portfolio, + `Corporate Bonds` = indices_bonds_results_portfolio) %>% + bind_rows(.id = "asset_class") %>% + filter(.data$ald_sector %in% .env$tech_roadmap_sectors) %>% + filter(.data$scenario_geography != "GlobalAggregate") %>% + filter(.data$asset_class %in% .env$asset_classes) %>% + filter(.data$asset_class == "Listed Equity" & .data$equity_market %in% .env$equity_markets | + .data$asset_class == "Corporate Bonds" & .data$equity_market %in% .env$bonds_markets) %>% + filter(.data$asset_class == "Listed Equity" & .data$technology %in% .env$equity_techs | + .data$asset_class == "Corporate Bonds" & .data$technology %in% .env$bonds_techs) %>% + filter(.data$asset_class == "Listed Equity" & .data$scenario_geography %in% .env$equity_scenario_geography | + .data$asset_class == "Corporate Bonds" & .data$scenario_geography %in% .env$bonds_scenario_geography) + + benchmark_data <- bind_rows(peers, indices) + + cols_with_supporting_info <- c("benchmark", "portfolio_name", "asset_class", "equity_market", + "scenario_source", "scenario_geography", "allocation", + "ald_sector", "technology", "year", "unit") + + list(portfolio = portfolio, + benchmark = benchmark_data) %>% + bind_rows(.id = "benchmark") %>% + mutate(benchmark = .data$benchmark == "benchmark") %>% + mutate(unit = case_when( + .data$ald_sector == "Power" ~ "MW", + .data$ald_sector == "Oil&Gas" ~ "GJ/a", + .data$ald_sector == "Coal" ~ "t/a", + .data$ald_sector == "Automotive" ~ "number of cars", + .data$ald_sector == "Aviation" ~ "number of planes", + .data$ald_sector == "Cement" ~ "t/a", + .data$ald_sector == "Steel" ~ "t/a" + )) %>% + select(all_of(cols_with_supporting_info), "scenario", + production = "plan_alloc_wt_tech_prod", "scen_alloc_wt_tech_prod") %>% + pivot_wider(names_from = "scenario", values_from = "scen_alloc_wt_tech_prod") %>% + pivot_longer(cols = -cols_with_supporting_info, names_to = "scenario", values_to = "value", + values_drop_na = TRUE) %>% + mutate(value = if_else(.data$year > min(.data$year + 5) & .data$value == 0, NA_real_, .data$value)) %>% + filter(!is.na(.data$value)) %>% + filter(.data$scenario == "production" | !.data$benchmark) %>% + mutate(equity_market = case_when( + .data$equity_market == "GlobalMarket" ~ "Global Market", + .data$equity_market == "DevelopedMarket" ~ "Developed Market", + .data$equity_market == "EmergingMarket" ~ "Emerging Market", + TRUE ~ .data$equity_market) + ) %>% + mutate(allocation = case_when( + .data$allocation == "portfolio_weight" ~ "Portfolio Weight", + .data$allocation == "ownership_weight" ~ "Ownership Weight", + )) %>% + filter(.data$year <= .env$start_year + .env$year_span) %>% + arrange(.data$asset_class, + factor(.data$equity_market, levels = c("Global Market", "Developed Market", "Emerging Market")), + factor(.data$scenario_source, levels = c("WEO2021", "GECO2021", "ETP2020", "IPR2021", "ISF2021")), + factor(.data$scenario_geography, levels = .env$scen_geo_levels), + factor(.data$technology, levels = .env$all_tech_levels)) + } diff --git a/R/prepare_pacta_dashboard_data.R b/R/prepare_pacta_dashboard_data.R new file mode 100644 index 0000000..2a08d63 --- /dev/null +++ b/R/prepare_pacta_dashboard_data.R @@ -0,0 +1,346 @@ +prepare_pacta_dashboard_data <- function( + params, + analysis_output_dir = Sys.getenv("ANALYSIS_OUTPUT_DIR"), + dashboard_data_dir = Sys.getenv("DASHBOARD_DATA_DIR"), + benchmarks_dir = Sys.getenv("BENCHMARKS_DIR") +) { + +# input and output directories ------------------------------------------------- + +input_dir <- analysis_output_dir +output_dir <- dashboard_data_dir +data_dir <- benchmarks_dir + + +# portfolio/user parameters ---------------------------------------------------- + +investor_name <- "investor_name" +portfolio_name <- "portfolio_name" +peer_group <- "peer_group" +language_select <- "EN" + +currency_exchange_value <- 1 +display_currency <- "USD" + +select_scenario_other <- "WEO2023_NZE_2050" +select_scenario <- "WEO2023_NZE_2050" + +green_techs <- c("RenewablesCap", "HydroCap", "NuclearCap", "Hybrid", "Electric", "FuelCell", "Hybrid_HDV", "Electric_HDV", "FuelCell_HDV","Electric Arc Furnace") +tech_roadmap_sectors <- c("Automotive", "Power", "Oil&Gas", "Coal") +pacta_sectors_not_analysed <- c("Steel", "Aviation", "Cement") + +power_tech_levels = c("RenewablesCap", "HydroCap", "NuclearCap", "GasCap", "OilCap", "CoalCap") +oil_gas_levels = c("Oil", "Gas") +coal_levels = c("Coal") +auto_levels = c("Electric", "Electric_HDV", "FuelCell","FuelCell_HDV", "Hybrid","Hybrid_HDV", "ICE", "ICE_HDV") +cement_levels = c("Integrated facility", "Grinding") +steel_levels = c("Electric Arc Furnace", "Open Hearth Furnace", "Basic Oxygen Furnace") +aviation_levels = c("Freight", "Passenger", "Mix", "Other") +all_tech_levels = c(power_tech_levels, auto_levels, oil_gas_levels, coal_levels, cement_levels, steel_levels, aviation_levels) + + +# config parameters from manifest ---------------------------------------------- + +manifest <- jsonlite::read_json(path = file.path(input_dir, "manifest.json")) + +start_year <- manifest$params$analysis$startYear +year_span <- manifest$params$analysis$timeHorizon +pacta_sectors <- unlist(manifest$params$analysis$sectorList) +equity_market_levels <- unlist(manifest$params$analysis$equityMarketList) +scen_geo_levels <- unlist(manifest$params$analysis$scenarioGeographiesList) + + +# load results from input directory -------------------------------------------- + +audit_file <- readRDS(file.path(input_dir, "audit_file.rds")) +emissions <- readRDS(file.path(input_dir, "emissions.rds")) +equity_results_portfolio <- readRDS(file.path(input_dir, "Equity_results_portfolio.rds")) +bonds_results_portfolio <- readRDS(file.path(input_dir, "Bonds_results_portfolio.rds")) +equity_results_company <- readRDS(file.path(input_dir, "Equity_results_company.rds")) +bonds_results_company <- readRDS(file.path(input_dir, "Bonds_results_company.rds")) + + +# data from PACTA inputs used to generate the results -------------------------- + +indices_bonds_results_portfolio <- readRDS(file.path(data_dir, "Indices_bonds_results_portfolio.rds")) +indices_equity_results_portfolio <- readRDS(file.path(data_dir, "Indices_equity_results_portfolio.rds")) +peers_bonds_results_portfolio <- pacta.portfolio.utils::empty_portfolio_results() +peers_equity_results_portfolio <- pacta.portfolio.utils::empty_portfolio_results() + + +# translations ----------------------------------------------------------------- + +dataframe_translations <- readr::read_csv( + system.file("extdata/translation/dataframe_labels.csv", package = "workflow.pacta.dashboard"), + col_types = readr::cols() +) + +header_dictionary <- readr::read_csv( + system.file("extdata/translation/dataframe_headers.csv", package = "workflow.pacta.dashboard"), + col_types = readr::cols() +) + +js_translations <- jsonlite::fromJSON( + txt = system.file("extdata/translation/js_labels.json", package = "workflow.pacta.dashboard") +) + +sector_order <- readr::read_csv( + system.file("extdata/sector_order/sector_order.csv", package = "workflow.pacta.dashboard"), + col_types = readr::cols() +) + +dictionary <- + choose_dictionary_language( + data = dataframe_translations, + language = language_select + ) + +header_dictionary <- replace_contents(header_dictionary, display_currency) + + +# add investor_name and portfolio_name to results data frames because ---------- +# pacta.portfolio.report functions expect that --------------------------------- + +audit_file <- + audit_file %>% + mutate( + investor_name = investor_name, + portfolio_name = portfolio_name + ) + +emissions <- + emissions %>% + mutate( + investor_name = investor_name, + portfolio_name = portfolio_name + ) + +equity_results_portfolio <- + equity_results_portfolio %>% + mutate( + investor_name = investor_name, + portfolio_name = portfolio_name + ) + +bonds_results_portfolio <- + bonds_results_portfolio %>% + mutate( + investor_name = investor_name, + portfolio_name = portfolio_name + ) + +equity_results_company <- + equity_results_company %>% + mutate( + investor_name = investor_name, + portfolio_name = portfolio_name + ) + +bonds_results_company <- + bonds_results_company %>% + mutate( + investor_name = investor_name, + portfolio_name = portfolio_name + ) + + +# data_included_table.json ----------------------------------------------------- + +audit_file %>% + prep_audit_table( + investor_name = investor_name, + portfolio_name = portfolio_name, + currency_exchange_value = currency_exchange_value + ) %>% + translate_df_contents("data_included_table", dictionary, inplace = TRUE) %>% + translate_df_headers("data_included_table", language_select, header_dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_included_table.json")) + + +# data_value_pie_bonds.json ---------------------------------------------------- + +audit_file %>% + prep_exposure_pie( + asset_type = "Bonds", + investor_name = investor_name, + portfolio_name = portfolio_name, + pacta_sectors = pacta_sectors, + currency_exchange_value = currency_exchange_value + ) %>% + translate_df_contents("data_value_pie_bonds", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_value_pie_bonds.json")) + + +# data_emissions_equity.json --------------------------------------------------- + +emissions %>% + prep_emissions_pie( + asset_type = "Equity", + investor_name = investor_name, + portfolio_name = portfolio_name, + pacta_sectors = pacta_sectors + ) %>% + translate_df_contents("data_emissions_pie_equity", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_emissions_pie_equity.json")) + + +# data_emissions_bonds.json ---------------------------------------------------- + +emissions %>% + prep_emissions_pie( + asset_type = "Bonds", + investor_name = investor_name, + portfolio_name = portfolio_name, + pacta_sectors = pacta_sectors + ) %>% + translate_df_contents("data_emissions_pie_bonds", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_emissions_pie_bonds.json")) + + +# data_value_pie_equity.json --------------------------------------------------- + +audit_file %>% + prep_exposure_pie( + asset_type = "Equity", + investor_name = investor_name, + portfolio_name = portfolio_name, + pacta_sectors = pacta_sectors, + currency_exchange_value = currency_exchange_value + ) %>% + translate_df_contents("data_value_pie_equity", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_value_pie_equity.json")) + + +# data_techmix.json ------------------------------------------------------------ + +prep_techexposure( + equity_results_portfolio = equity_results_portfolio, + bonds_results_portfolio = bonds_results_portfolio, + investor_name = investor_name, + portfolio_name = portfolio_name, + indices_equity_results_portfolio = indices_equity_results_portfolio, + indices_bonds_results_portfolio = indices_bonds_results_portfolio, + peers_equity_results_portfolio = peers_equity_results_portfolio, + peers_bonds_results_portfolio = peers_bonds_results_portfolio, + peer_group = peer_group, + select_scenario_other = select_scenario_other, + select_scenario = select_scenario, + start_year = start_year, + green_techs = green_techs, + equity_market_levels = equity_market_levels, + all_tech_levels = all_tech_levels + ) %>% + translate_df_contents("techexposure_data", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_techexposure.json")) + + +# data_techmix_sector.json ----------------------------------------------------- + +prep_techmix_sector( + equity_results_portfolio, + bonds_results_portfolio, + indices_equity_results_portfolio, + indices_bonds_results_portfolio, + peers_equity_results_portfolio, + peers_bonds_results_portfolio, + investor_name, + portfolio_name, + start_year, + year_span, + peer_group, + green_techs, + all_tech_levels + ) %>% + jsonlite::write_json(path = file.path(output_dir, "data_techmix_sector.json")) + +# data_trajectory_alignment.json ----------------------------------------------- + +prep_trajectory_alignment( + equity_results_portfolio = equity_results_portfolio, + bonds_results_portfolio = bonds_results_portfolio, + peers_equity_results_portfolio = peers_equity_results_portfolio, + peers_bonds_results_portfolio = peers_bonds_results_portfolio, + indices_equity_results_portfolio = indices_equity_results_portfolio, + indices_bonds_results_portfolio = indices_bonds_results_portfolio, + investor_name = investor_name, + portfolio_name = portfolio_name, + tech_roadmap_sectors = tech_roadmap_sectors, + peer_group = peer_group, + start_year = start_year, + year_span = year_span, + scen_geo_levels = scen_geo_levels, + all_tech_levels = all_tech_levels + ) %>% + translate_df_contents("data_trajectory_alignment", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_trajectory_alignment.json")) + + +# data_emissions.json ---------------------------------------------------------- + +prep_emissions_trajectory( + equity_results_portfolio = equity_results_portfolio, + bonds_results_portfolio = bonds_results_portfolio, + investor_name = investor_name, + portfolio_name = portfolio_name, + select_scenario_other = select_scenario_other, + select_scenario = select_scenario, + pacta_sectors = pacta_sectors, + year_span = year_span, + start_year = start_year + ) %>% + translate_df_contents("data_emissions", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_emissions.json")) + +# data_exposure_stats.json + +prep_exposure_stats( + audit_file = audit_file, + investor_name = investor_name, + portfolio_name = portfolio_name, + pacta_sectors = pacta_sectors, + currency_exchange_value = currency_exchange_value + ) %>% + jsonlite::write_json(path = file.path(output_dir, "data_exposure_stats.json")) + + +# data_company_bubble.json ----------------------------------------------------- + +prep_company_bubble( + equity_results_company = equity_results_company, + bonds_results_company = bonds_results_company, + portfolio_name = portfolio_name, + start_year = start_year, + green_techs = green_techs + ) %>% + translate_df_contents("data_company_bubble", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_company_bubble.json")) + + +# data_techexposure_company_companies.json ------------------------------------- + +prep_key_bars_company( + equity_results_company = equity_results_company, + bonds_results_company = bonds_results_company, + portfolio_name = portfolio_name, + start_year = start_year, + pacta_sectors_not_analysed = pacta_sectors_not_analysed, + all_tech_levels = all_tech_levels + ) %>% + translate_df_contents("data_key_bars_company", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_techexposure_company_companies.json")) + + +# data_techexposure_company_portfolio.json ------------------------------------- + +prep_key_bars_portfolio( + equity_results_portfolio = equity_results_portfolio, + bonds_results_portfolio = bonds_results_portfolio, + portfolio_name = portfolio_name, + start_year = start_year, + pacta_sectors_not_analysed = pacta_sectors_not_analysed, + all_tech_levels = all_tech_levels + ) %>% + translate_df_contents("data_key_bars_portfolio", dictionary) %>% + jsonlite::write_json(path = file.path(output_dir, "data_techexposure_company_portfolio.json")) + +} diff --git a/R/replace_contents.R b/R/replace_contents.R new file mode 100644 index 0000000..07e01c4 --- /dev/null +++ b/R/replace_contents.R @@ -0,0 +1,5 @@ +replace_contents <- function(data, display_currency) { + mutate(data, across(.cols = everything(), .fns = ~ gsub("_CUR_", display_currency, .x))) +} + + diff --git a/R/scenarios_found_in_sectors.R b/R/scenarios_found_in_sectors.R new file mode 100644 index 0000000..c675ad1 --- /dev/null +++ b/R/scenarios_found_in_sectors.R @@ -0,0 +1,7 @@ +scenarios_found_in_sectors <- function(data, select_scenario_param, sectors) { + out <- (data$ald_sector %in% sectors) & + (data$scenario == get_scenario(select_scenario_param)) & + (data$scenario_source == get_scenario_source(select_scenario_param)) + out +} + diff --git a/R/translate_column_contents.R b/R/translate_column_contents.R new file mode 100644 index 0000000..4a3ec71 --- /dev/null +++ b/R/translate_column_contents.R @@ -0,0 +1,27 @@ +translate_column_contents <- + function(data, dictionary, column, inplace = FALSE) { + dictionary_column <- + dictionary %>% + filter(.data$id_column == .env$column) %>% + select(-"id_column") + + if (inplace) { + new_column <- column + } else { + new_column <- glue::glue(column, "_translation") + } + + data %>% + left_join( + dictionary_column, + by = rlang::set_names("translate_key", column) + ) %>% + mutate( + !!new_column := if_else( + is.na(.data$translate_value), + .data[[!!column]], + .data$translate_value + ) + ) %>% + select(-"translate_value") + } diff --git a/R/translate_df_contents.R b/R/translate_df_contents.R new file mode 100644 index 0000000..9a6d33b --- /dev/null +++ b/R/translate_df_contents.R @@ -0,0 +1,30 @@ +translate_df_contents <- + function(data, id_data, dictionary, inplace = FALSE) { + if (!(id_data %in% dictionary$id_data)) { + rlang::abort( + class = "dataset not in dictionary", + glue::glue("the dataset {id_data} is not defined in translation dictionary.") + ) + } + + dictionary_subset <- + dictionary %>% + filter(.data$id_data == .env$id_data) %>% + transmute( + .data$id_column, + .data$translate_key, + .data$translate_value + ) + + for (column in unique(dictionary_subset$id_column)) { + data <- + translate_column_contents( + data = data, + dictionary = dictionary_subset, + column = column, + inplace = inplace + ) + } + + data + } diff --git a/R/translate_df_headers.R b/R/translate_df_headers.R new file mode 100644 index 0000000..7907e85 --- /dev/null +++ b/R/translate_df_headers.R @@ -0,0 +1,26 @@ +translate_df_headers <- + function(data, id_data, language_select, dictionary) { + language <- tolower(language_select) + + if (!(id_data %in% dictionary$id_data)) { + rlang::abort( + class = "dataset not in dictionary", + glue::glue("the dataset {id_data} is not defined in translation dictionary.") + ) + } + + column_tibble <- tibble(column_name = names(data)) + + dictionary_subset <- + dictionary %>% + filter(.data$id_data == .env$id_data) %>% + transmute(.data$id_column, .data[[!!language]]) + + translated_headers <- + dictionary_subset %>% + left_join(column_tibble, by = c(id_column = "column_name")) + + names(data) <- translated_headers[[language]] + + data + } diff --git a/R/workflow.pacta.dashboard-package.R b/R/workflow.pacta.dashboard-package.R new file mode 100644 index 0000000..ac090cb --- /dev/null +++ b/R/workflow.pacta.dashboard-package.R @@ -0,0 +1,43 @@ +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +#' @importFrom dplyr across +#' @importFrom dplyr all_of +#' @importFrom dplyr arrange +#' @importFrom dplyr bind_rows +#' @importFrom dplyr case_when +#' @importFrom dplyr desc +#' @importFrom dplyr distinct +#' @importFrom dplyr everything +#' @importFrom dplyr filter +#' @importFrom dplyr first +#' @importFrom dplyr group_by +#' @importFrom dplyr if_else +#' @importFrom dplyr inner_join +#' @importFrom dplyr join_by +#' @importFrom dplyr lag +#' @importFrom dplyr last +#' @importFrom dplyr left_join +#' @importFrom dplyr mutate +#' @importFrom dplyr mutate_at +#' @importFrom dplyr n +#' @importFrom dplyr pull +#' @importFrom dplyr reframe +#' @importFrom dplyr rename +#' @importFrom dplyr row_number +#' @importFrom dplyr select +#' @importFrom dplyr slice +#' @importFrom dplyr summarise +#' @importFrom dplyr tibble +#' @importFrom dplyr transmute +#' @importFrom dplyr ungroup +#' @importFrom magrittr %>% +#' @importFrom rlang := +#' @importFrom rlang .data +#' @importFrom rlang .env +#' @importFrom tidyr pivot_longer +#' @importFrom tidyr pivot_wider +#' @importFrom tidyr unite +## usethis namespace: end +NULL diff --git a/docker-compose.yml b/docker-compose.yml index db733e9..7d95f12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,16 +2,26 @@ services: workflow.pacta.dashboard: build: . + # stdin_open: true + # tty: true + # entrypoint: ["bash"] + # entrypoint: ["R", "--args"] + # command: '{\"portfolio\": {\"files\": [\"default_portfolio.csv\"], \"holdingsDate\": \"2023-12-31\", \"name\": \"FooPortfolio\"}, \"inherit\": \"GENERAL_2023Q4\"}' + environment: + LOG_LEVEL: TRACE + ANALYSIS_OUTPUT_DIR: "/mnt/analysis_output_dir" + BENCHMARKS_DIR: "/mnt/benchmarks_dir" + DASHBOARD_DATA_DIR: "/mnt/dashboard_data_dir" volumes: - type: bind - source: ${INPUT_DIR} - target: /workflow.pacta.dashboard/inputs + source: ${benchmarks_dir:-./benchmarks_dir} + target: /mnt/benchmarks_dir/ read_only: true - type: bind - source: ${DATA_DIR} - target: /workflow.pacta.dashboard/data + source: ${analysis_output_dir:-./analysis_output_dir} + target: /mnt/analysis_output_dir read_only: true - type: bind - source: ${OUTPUT_DIR} - target: /workflow.pacta.dashboard/outputs + source: ${dashboard_data_dir:-./dashboard_data_dir} + target: /mnt/dashboard_data_dir read_only: false diff --git a/inst/extdata/scripts/prepare_dashboard_data.R b/inst/extdata/scripts/prepare_dashboard_data.R new file mode 100644 index 0000000..044de96 --- /dev/null +++ b/inst/extdata/scripts/prepare_dashboard_data.R @@ -0,0 +1,31 @@ +# logger::log_threshold(Sys.getenv("LOG_LEVEL", "INFO")) + +# raw_params <- commandArgs(trailingOnly = TRUE) +# params <- pacta.workflow.utils::parse_raw_params( +# json = raw_params, +# inheritence_search_paths = system.file( +# "extdata", "parameters", +# package = "workflow.pacta.report" +# ) , +# schema_file = system.file( +# "extdata", "schema", "reportingParameters.json", +# package = "workflow.pacta.report" +# ), +# raw_schema_file = system.file( +# "extdata", "schema", "rawParameters.json", +# package = "workflow.pacta.report" +# ), +# force_array = c("portfolio", "files") +# ) + +manifest_info <- workflow.pacta.dashboard:::prepare_pacta_dashboard_data( + # params = params +) + +# pacta.workflow.utils::export_manifest( +# input_files = manifest_info[["input_files"]], +# output_files = manifest_info[["output_files"]], +# params = manifest_info[["params"]], +# manifest_path = file.path(Sys.getenv("REPORT_OUTPUT_DIR"), "manifest.json"), +# raw_params = raw_params +# ) diff --git a/inst/extdata/sector_order/sector_order.csv b/inst/extdata/sector_order/sector_order.csv new file mode 100644 index 0000000..fa483f3 --- /dev/null +++ b/inst/extdata/sector_order/sector_order.csv @@ -0,0 +1,43 @@ +ald_sector,technology +Power,RenewablesCap +Power,HydroCap +Power,NuclearCap +Power,GasCap +Power,OilCap +Power,CoalCap +Automotive,Electric +Automotive,Electric_HDV +Automotive,FuelCell +Automotive,FuelCell_HDV +Automotive,Hybrid +Automotive,Hybrid_HDV +Automotive,ICE +Automotive,ICE_HDV +Oil&Gas,Oil +Oil&Gas,Gas +Coal,Coal +Fossil Fuels,Oil +Fossil Fuels,Gas +Fossil Fuels,Coal +Cement,Integrated facility +Cement,Grinding +Steel,Ac-Electric Arc Furnace +Steel,Basic Oxygen Furnace +Steel,Dc-Electric Arc Furnace +Steel,Electric Arc Furnace +Steel,Bof Shop +Steel,Open Hearth Furnace +Steel,Open Hearth Meltshop +Aviation,Freight +Aviation,Passenger +Aviation,Mix +Aviation,Other +Shipping,A Grade +Shipping,B Grade +Shipping,C Grade +Shipping,D Grade +Shipping,E Grade +Shipping,F Grade +Shipping,G Grade +Shipping,U Grade +Shipping,No Grade diff --git a/inst/extdata/translation/dataframe_headers.csv b/inst/extdata/translation/dataframe_headers.csv new file mode 100644 index 0000000..383e85c --- /dev/null +++ b/inst/extdata/translation/dataframe_headers.csv @@ -0,0 +1,12 @@ +id_data,id_column,en,de,fr,es +data_included_table,asset_type_analysis,Asset Class,Anlageklasse,Catégorie d'actifs,Tipo de Activo +data_included_table,total_value_invested,Portfolio value invested (M _CUR_),Investierter Portfoliowert (M _CUR_),Valeur du portefeuille investi (M _CUR_),Valor del portafolio invertido (M _CUR_) +data_included_table,percentage_value_invested,Portfolio value invested (%),Investierter Portfoliowert (%),Valeur du portefeuille investi (%),Valor del portafolio invertido (%) +data_included_table,included,Included in the analysis,In der Analyse enthalten,Inclus dans l'analyse,Incluído en el análisis +data_included_table,value_invested,Value breakout per means of investment,Wertaufteilung pro Investitionsmittel,Répartition de la valeur par moyen d'investissement,Desglose de valor por tipo de inversión +data_included_table,investment_means,_,_,_,_ +data_peer_table,Asset Class,Asset Class,Anlageklasse,Catégorie d'actifs,Tipo de Activo +data_peer_table,Sector,Sector,Sektor,Secteur,Sector +data_peer_table,Technology,Technology,Technologie,Technologie,Tecnología +data_peer_table,Rank among peer group,Rank among peer group,Rang in der Peer-Gruppe,Classement dans le groupe de pairs,Clasificación entre el grupo de pares +data_peer_table,Rank among all participants,Rank among all participants,Rang unter allen Teilnehmern,Classement parmi tous les participants,Clasificación entre los participantes diff --git a/inst/extdata/translation/dataframe_labels.csv b/inst/extdata/translation/dataframe_labels.csv new file mode 100644 index 0000000..2af165a --- /dev/null +++ b/inst/extdata/translation/dataframe_labels.csv @@ -0,0 +1,438 @@ +id_data,id_column,key,en,de,fr,es +data_included_table,asset_type_analysis,Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_included_table,asset_type_analysis,Equity,Listed Equity,Aktien,Actions,Acciones +data_included_table,asset_type_analysis,Funds,Funds,Fonds,Fonds,Fondos +data_included_table,asset_type_analysis,Other,Other Asset Classes,Andere Asset-Klassen,Autres classes d'actifs,Otra clase de activos +data_included_table,asset_type_analysis,Unclassified,Unclassified,Nicht klassifiziert,Non classifié,No clasificado +data_included_table,asset_type_analysis,Total,Total,Gesamt,Total,Total +data_included_table,included,Yes,Yes,Ja,Oui,Si +data_included_table,included,No,No,Nein,Non,No +data_included_table,investment_means,Direct,Direct,Direkt,Direct,Directo +data_included_table,investment_means,Via a Fund,Via a Fund,Über einen Fonds,Par le biais d'un fonds,A través de un fondo +data_included_table,investment_means,Unidentified Funds,Unidentified Funds,Nicht identifizierte Fonds,Fonds non identifiés,Fondos no identificados +data_value_pie_equity,key,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_value_pie_equity,key,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_value_pie_equity,key,Cement,Cement,Zement,Ciment,Cement +data_value_pie_equity,key,Coal,Coal,Kohle,Charbon,Carbón +data_value_pie_equity,key,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_value_pie_equity,key,Power,Power,Energie,Power,Energía +data_value_pie_equity,key,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +data_value_pie_equity,key,Steel,Steel,Stahl,Acier,Acero +data_value_pie_equity,key,Consumer Staples,Consumer Staples,Basiskonsumgüter,Consommation de base,Productos básicos de consumo +data_value_pie_equity,key,Energy,Energy,Energie,Énergie,Energia +data_value_pie_equity,key,Unclassifiable,Unclassifiable,Nicht klassifizierbar,Inclassable,No clasificable +data_value_pie_equity,key,Communications,Communications,Mitteilungen,Communications,Comunicaciones +data_value_pie_equity,key,Consumer Disrectionary,Consumer Disrectionary,Konsumentenverweigerer,Biens non essentiels,Bienes no esenciales +data_value_pie_equity,key,Industrials,Industrials,Industrielle,Industrie,Industriales +data_value_pie_equity,key,Financials,Financials,Finanzen,Finances,Financieros +data_value_pie_equity,key,Utilities,Utilities,Versorgungsunternehmen,Services publics,Servicios públicos +data_value_pie_equity,key,Materials,Materials,Materialien,Matériel,Materiales +data_value_pie_equity,key,Technology,Technology,Technologie,Technologie,Tecnología +data_value_pie_equity,key,Health Care,Health Care,Gesundheitspflege,Soins de santé,Servicios de salud +data_value_pie_bonds,key,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_value_pie_bonds,key,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_value_pie_bonds,key,Cement,Cement,Zement,Ciment,Cement +data_value_pie_bonds,key,Coal,Coal,Kohle,Charbon,Carbón +data_value_pie_bonds,key,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_value_pie_bonds,key,Power,Power,Energie,Energie,Energía +data_value_pie_bonds,key,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +data_value_pie_bonds,key,Steel,Steel,Stahl,Acier,Acero +data_value_pie_bonds,key,Consumer Staples,Consumer Staples,Basiskonsumgüter,Consommation de base,Productos básicos de consumo +data_value_pie_bonds,key,Energy,Energy,Energie,Énergie,Energia +data_value_pie_bonds,key,Unclassifiable,Unclassifiable,Nicht klassifizierbar,Inclassable,No clasificable +data_value_pie_bonds,key,Communications,Communications,Mitteilungen,Communications,Comunicaciones +data_value_pie_bonds,key,Consumer Disrectionary,Consumer Disrectionary,Konsumentenverweigerer,Biens non essentiels,Bienes no esenciales +data_value_pie_bonds,key,Industrials,Industrials,Industrielle,Industrie,Industriales +data_value_pie_bonds,key,Financials,Financials,Finanzen,Finances,Financieros +data_value_pie_bonds,key,Utilities,Utilities,Versorgungsunternehmen,Services publiques,Servicios públicos +data_value_pie_bonds,key,Materials,Materials,Materialien,Matériel,Materiales +data_value_pie_bonds,key,Technology,Technology,Technologie,Technologie,Tecnología +data_value_pie_bonds,key,Health Care,Health Care,Gesundheitspflege,Soins de santé,Servicios de salud +data_emissions_pie_equity,key,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_emissions_pie_equity,key,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_emissions_pie_equity,key,Cement,Cement,Zement,Ciment,Cement +data_emissions_pie_equity,key,Coal,Coal,Kohle,Charbon,Carbón +data_emissions_pie_equity,key,Oil&Gas,Oil&Gas,Öl&Gas,Pétrole et gaz,Petróleo y gas +data_emissions_pie_equity,key,Power,Power,Energie,Energie,Energía +data_emissions_pie_equity,key,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +data_emissions_pie_equity,key,Steel,Steel,Stahl,Acier,Acero +data_emissions_pie_equity,key,Consumer Staples,Consumer Staples,Basiskonsumgüter,Consommation de base,Productos básicos de consumo +data_emissions_pie_equity,key,Cement&Steel,Cement&Steel,Zement&Stahl,Ciment et acier,Cemento y Acero +data_emissions_pie_equity,key,Communications,Communications,Mitteilungen,Communications,Comunicaciones +data_emissions_pie_equity,key,Consumer Discretionary,Consumer Discretionary,Diskretionäre Verbraucher,Biens non essentiels,Bienes no esenciales +data_emissions_pie_equity,key,Financials,Financials,Finanzen,Finances,Financieros +data_emissions_pie_equity,key,Health Care,Health Care,Gesundheitspflege,Soins de santé,Servicios de salud +data_emissions_pie_equity,key,Other Energy,Other Energy,Andere Energie,Autres énergies,Otros Energía +data_emissions_pie_equity,key,Other Industrials,Other Industrials,Andere Industrielle,Autres secteurs industriels,Otros Industriales +data_emissions_pie_equity,key,Other Materials,Other Materials,Andere Materialien,Autres matériels,Otros Materiales +data_emissions_pie_equity,key,Other Utilities,Other Utilities,Andere Versorgungsunternehmen,Autres services publics,Otros Servicios públicos +data_emissions_pie_equity,key,Technology,Technology,Technologie,Technologie,Tecnología +data_emissions_pie_equity,key,Unclassifiable,Unclassifiable,Nicht klassifizierbar,Inclassable,No clasificable +data_emissions_pie_bonds,key,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_emissions_pie_bonds,key,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_emissions_pie_bonds,key,Cement,Cement,Zement,Ciment,Cement +data_emissions_pie_bonds,key,Coal,Coal,Kohle,Charbon,Carbón +data_emissions_pie_bonds,key,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_emissions_pie_bonds,key,Power,Power,Energie,Energie,Energía +data_emissions_pie_bonds,key,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +data_emissions_pie_bonds,key,Steel,Steel,Stahl,Acier,Acero +data_emissions_pie_bonds,key,Consumer Staples,Consumer Staples,Basiskonsumgüter,Consommation de base,Productos básicos de consumo +data_emissions_pie_bonds,key,Cement&Steel,Cement & Steel,Zement & Stahl,Ciment et acier,Cemento y Acero +data_emissions_pie_bonds,key,Communications,Communications,Mitteilungen,Communications,Comunicaciones +data_emissions_pie_bonds,key,Consumer Discretionary,Consumer Discretionary,Diskretionäre Verbraucher,Biens non essentiels,Bienes no esenciales +data_emissions_pie_bonds,key,Financials,Financials,Finanzen,Finances,Financieros +data_emissions_pie_bonds,key,Health Care,Health Care,Gesundheitspflege,Soins de santé,Servicios de salud +data_emissions_pie_bonds,key,Other Energy,Other Energy,Andere Energie,Autres énergies,Otros Energía +data_emissions_pie_bonds,key,Other Industrials,Other Industrials,Andere Industrielle,Autres secteurs industriels,Otros Industriales +data_emissions_pie_bonds,key,Other Materials,Other Materials,Andere Materialien,Autres matériels,Otros Materiales +data_emissions_pie_bonds,key,Other Utilities,Other Utilities,Andere Versorgungsunternehmen,Autres services publics,Otros Servicios públicos +data_emissions_pie_bonds,key,Technology,Technology,Technologie,Technologie,Tecnología +data_emissions_pie_bonds,key,Unclassifiable,Unclassifiable,Nicht klassifizierbar,Inclassable,No clasificable +techexposure_data,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +techexposure_data,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +techexposure_data,equity_market,Global Market,Global Market,Globaler Markt,Marché mondial,Mercado Global +techexposure_data,equity_market,Developed Market,Developed Market,Entwickelter Markt,Marché développé,Mercado Desarrollado +techexposure_data,equity_market,Emerging Market,Emerging Market,Aufstrebender Markt,Marché émergent,Mercado Emergente +techexposure_data,ald_sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +techexposure_data,ald_sector,Coal,Coal,Kohle,Charbon,Carbón +techexposure_data,ald_sector,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +techexposure_data,ald_sector,Power,Power,Energie,Energie,Energía +techexposure_data,ald_sector,Steel,Steel,Stahl,Acier,Acero +techexposure_data,ald_sector,Cement,Cement,Zement,Ciment,Cement +techexposure_data,ald_sector,Aviation,Aviation,Luftfahrt,Aviation,Aviación +techexposure_data,ald_sector,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +techexposure_data,technology,RenewablesCap,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables +techexposure_data,technology,HydroCap,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +techexposure_data,technology,NuclearCap,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +techexposure_data,technology,GasCap,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +techexposure_data,technology,OilCap,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +techexposure_data,technology,CoalCap,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +techexposure_data,technology,Electric,LDV: Electric,LDV: Elektrische,LDV: Électrique,VL: Vehículos eléctricos +techexposure_data,technology,Hybrid,LDV: Hybrid,LDV: Hybrid,LDV: Hybride,VL: Vehículos híbridos +techexposure_data,technology,ICE,LDV: ICE,LDV: Verbrennungsmotor,LDV: Moteur à combustion,VL: Vehículos de combustión interna +techexposure_data,technology,Oil,Oil,Öl,Extraction de pétrole,Petróleo +techexposure_data,technology,Gas,Gas,Gas,Extraction de gaz,Gas +techexposure_data,technology,FuelCell,LDV: Fuel Cell,LDV: Brennstoffzellen,LDV: Pile à combustible,VL: Vehículos de pilas de combustibles +techexposure_data,technology,Electric_HDV,HDV: Electric,HDV: Elektrisches,HDV: Électrique,VP: Vehículos eléctricos +techexposure_data,technology,FuelCell_HDV,HDV: Fuel Cell,HDV: Brennstoffzellen,HDV: Pile à combustible,VP: Vehículos de pilas de combustibles +techexposure_data,technology,Hybrid_HDV,HDV: Hybrid,HDV: Hybridantrieb,HDV: Hybride,VP: Vehículos híbridos +techexposure_data,technology,ICE_HDV,HDV: ICE,HDV: Verbrennungsmotor,HDV: Moteur à combustion,VP: Vehículos de combustión interna +techexposure_data,technology,Coal,Coal,Kohle,Charbon,Carbón +techexposure_data,technology,Freight,Freight,Fracht,Fret,Carga +techexposure_data,technology,Passenger,Passenger,Passagier,Passager,Pasajero +techexposure_data,technology,Mix,Mix,Mischen,Mix,Mixto +techexposure_data,technology,Other,Other,Andere,Autres,Otro +techexposure_data,technology,Integrated Facility,Integrated Facility,Integrierte Anlage,Facilité intégrée,Sistema integrado +techexposure_data,technology,Grinding,Grinding,Schleifen,Broyage,Triturado +techexposure_data,technology,Ac-Electric Arc Furnace,Ac-Electric Arc Furnace,AC-Elektrolichtbogenofen,AC - Four électrique à arc,Horno de arco eléctrico de CA +techexposure_data,technology,Dc-Electric Arc Furnace,Dc-Electric Arc Furnace,DC-Elektrolichtbogenofen,DC - Four électrique à arc,Horno de arco eléctrico de CC +techexposure_data,technology,Bof Shop,Basic Oxygen Furnace,LD-Verfahren,Procédé LD,Horno de oxígeno básico +techexposure_data,technology,Open Hearth Meltshop,Open hearth furnace,Schmelzbetrieb mit offenem Herd,Procédé Martin-Siemens,Horno a cielo abierto +techexposure_data,portfolio_name,pensionfund,Pension Fund Peer Group,Pensionsfonds Peergroup,Fonds de pensiongrupo de pares,Fondos de pensiones groupe de pairs +techexposure_data,portfolio_name,assetmanager,Asset Manager Peer Group,Vermögensverwalter Peergroup,Gestionnaire d'actifs grupo de pares,Administrador de activos groupe de pairs +techexposure_data,portfolio_name,bank,Banking Peer Group,Bankwesen Peergroup,Banque grupo de pares,Banca groupe de pairs +techexposure_data,portfolio_name,insurance,Insurance Peer Group,Versicherung Peergroup,Assurance grupo de pares,Aseguradoras groupe de pairs +techexposure_data,portfolio_name,Meta Investor,Meta Investor Peer Group,Meta-Investor Peergroup,Méta-investisseur grupo de pares,Meta Inversionista groupe de pairs +techexposure_data,portfolio_name,Others,Others Peer Group,Anderen Peergroup,Autres grupo de pares,Otros groupe de pairs +techexposure_data,portfolio_name,Pension Funds and Insurances,Pension Funds and Insurances Peer Group,Pensionsfonds und Versicherung Peergroup,Fonds de pension et assurances grupo de pares,Fondos de pensiones groupe de pairs +techexposure_data,portfolio_name,Banks and Asset Managers,Banks and Asset Managers Peer Group,Banken und Vermögensverwalter Peergroup,Banques et gestionnaires d'actifs grupo de pares,Bancos y administradores de activos groupe de pairs +techexposure_data,portfolio_name,multimercado_alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao +techexposure_data,portfolio_name,multimercado_estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia +techexposure_data,portfolio_name,outros,Outros,Outros,Outros,Outros +techexposure_data,portfolio_name,renda_fixa_credito_privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado +techexposure_data,portfolio_name,acoes_indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados +techexposure_data,portfolio_name,acoes_esg,Acoes ESG,Acoes ESG,Acoes ESG,Acoes ESG +techexposure_data,portfolio_name,acoes_ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos +techexposure_future_data,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +techexposure_future_data,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +techexposure_future_data,equity_market,Global Market,Global Market,Globaler Markt,Marché mondial,Mercado Global +techexposure_future_data,equity_market,Developed Market,Developed Market,Entwickelter Markt,Marché développé,Mercado Desarrollado +techexposure_future_data,equity_market,Emerging Market,Emerging Market,Aufstrebender Markt,Marché émergent,Mercado Emergente +techexposure_future_data,ald_sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +techexposure_future_data,ald_sector,Fossil Fuels,Fossil Fuels,Fossile Brennstoffe,Combustibles fossiles,Combustibles fósiles +techexposure_future_data,ald_sector,Power,Power,Energie,Energie,Energía +techexposure_future_data,technology,RenewablesCap,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables +techexposure_future_data,technology,HydroCap,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +techexposure_future_data,technology,NuclearCap,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +techexposure_future_data,technology,GasCap,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +techexposure_future_data,technology,OilCap,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +techexposure_future_data,technology,CoalCap,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +techexposure_future_data,technology,Electric,LDV: Electric,LDV: Elektrische,LDV: Électrique,VL: Vehículos eléctricos +techexposure_future_data,technology,Hybrid,LDV: Hybrid,LDV: Hybrid,LDV: Hybride,VL: Vehículos híbridos +techexposure_future_data,technology,FuelCell,LDV: Fuel Cell,LDV: Brennstoffzellen,LDV: Pile à combustible,VL: Vehículos de pilas de combustibles +techexposure_future_data,technology,ICE,LDV: ICE,LDV: Verbrennungsmotor,LDV: Moteur à combustion,VL: Vehículos de combustión interna +techexposure_future_data,technology,Oil,Oil,Öl,Pétrole,Petróleo +techexposure_future_data,technology,Gas,Gas,Gas,Gaz,Gas +techexposure_future_data,technology,Electric_HDV,HDV: Electric,HDV: Elektrisches,HDV: électrique,VP: Vehículos eléctricos +techexposure_future_data,technology,FuelCell_HDV,HDV: Fuel Cell,HDV: Brennstoffzellen,HDV: Pile à combustible,VP: Vehículos de pilas de combustibles +techexposure_future_data,technology,Hybrid_HDV,HDV: Hybrid,HDV: Hybridantrieb,HDV: Hybride,VP: Vehículos híbridos +techexposure_future_data,technology,ICE_HDV,HDV: ICE,HDV: Verbrennungsmotor,HDV: Moteur à combustion,VP: Vehículos de combustión interna +techexposure_future_data,technology,Coal,Coal,Kohle,Charbon,Carbón +techexposure_future_data,technology,Freight,Freight,Fracht,Fret,Carga +techexposure_future_data,technology,Passenger,Passenger,Passagier,Passager,Pasajero +techexposure_future_data,technology,Mix,Mix,Mischen,Mix,Mixto +techexposure_future_data,val_type,Portfolio,Portfolio,Portfolio,Portefeuille,Portafolio +techexposure_future_data,val_type,Aligned Portfolio,Aligned Portfolio,Ausgerichtetes Portfolio,Portefeuille aligné,Portafolio alineado +techexposure_future_data,val_type,Aligned Benchmark,Aligned Benchmark,Ausgerichteter Benchmark,Référence aligné,Portafolio de referencia alineado +techexposure_future_data,val_type,Benchmark,Benchmark,Benchmark,Référence,Portafolio de referencia +techexposure_future_data,portfolio_name,pensionfund,Pension Fund Peer Group,Pensionsfonds Peergroup,Fonds de pensiongrupo de pares,Fondos de pensiones groupe de pairs +techexposure_future_data,portfolio_name,assetmanager,Asset Manager Peer Group,Vermögensverwalter Peergroup,Gestionnaire d'actifs grupo de pares,Administrador de activos groupe de pairs +techexposure_future_data,portfolio_name,bank,Banking Peer Group,Bankwesen Peergroup,Banque grupo de pares,Banca groupe de pairs +techexposure_future_data,portfolio_name,insurance,Insurance Peer Group,Versicherung Peergroup,Assurance grupo de pares,Aseguradoras groupe de pairs +techexposure_future_data,portfolio_name,Meta Investor,Meta Investor Peer Group,Meta-Investor Peergroup,Méta-investisseur grupo de pares,Meta Inversionista groupe de pairs +techexposure_future_data,portfolio_name,Others,Others Peer Group,Anderen Peergroup,Autres grupo de pares,Otros groupe de pairs +techexposure_future_data,portfolio_name,Pension Funds and Insurances,Pension Funds and Insurances Peer Group,Pensionsfonds und Versicherung Peergroup,Fonds de pension et assurances grupo de pares,Fondos de pensiones groupe de pairs +techexposure_future_data,portfolio_name,Banks and Asset Managers,Banks and Asset Managers Peer Group,Banken und Vermögensverwalter Peergroup,Banques et gestionnaires d'actifs grupo de pares,Bancos y administradores de activos groupe de pairs +techexposure_future_data,portfolio_name,multimercado_alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao +techexposure_future_data,portfolio_name,multimercado_estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia +techexposure_future_data,portfolio_name,outros,Outros,Outros,Outros,Outros +techexposure_future_data,portfolio_name,renda_fixa_credito_privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado +techexposure_future_data,portfolio_name,acoes_indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados +techexposure_future_data,portfolio_name,acoes_esg,Acoes ESG,Acoes ESG,Acoes ESG,Acoes ESG +techexposure_future_data,portfolio_name,acoes_ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos +data_map,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_map,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_map,option,Gas,Gas,Gas,Gaz,Gas +data_map,option,Oil,Oil,Öl,Pétrole,Petróleo +data_map,option,All Power,All Power,Alle Energie,Tout Energie,Toda la generación de energía +data_map,option,HydroCap,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +data_map,option,GasCap,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +data_map,option,RenewablesCap,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables +data_map,option,All Automotive,All Automotive,Alle Automobilindustrie,Tous les secteurs de l'automobile,Todo el sector automotriz +data_map,option,ICE,LDV: ICE,LDV: Verbrennungsmotor,LDV: Moteur à combustion,VL: Vehículos de combustión interna +data_map,option,Hybrid,LDV: Hybrid,LDV: Hybrid,LDV: Hybride,VL: Vehículos híbridos +data_map,option,CoalCap,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +data_map,option,OilCap,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +data_map,option,Electric,LDV: Electric,LDV: Elektrische,LDV: Électrique,VL: Vehículos eléctricos +data_map,option,FuelCell_HDV,HDV: Fuel Cell,HDV: Brennstoffzellen,HDV: Pile à combustible,VP: Vehículos de pilas de combustibles +data_map,option,ICE_HDV,HDV: ICE,HDV: Verbrennungsmotor Fahrzeuge,HDV: Moteur à combustion,VP: Vehículos de combustión interna +data_map,option,FuelCell,LDV: Fuel Cell,LDV: Brennstoffzellen,LDV: Pile à combustible,VL: Vehículos de pilas de combustibles +data_map,option,Electric_HDV,HDV: Electric,HDV: Elektrische Fahrzeuge,HDV: Électrique,VP: Vehículos eléctricos +data_map,option,Hybrid_HDV,HDV: Hybrid,HDV: Hybrid Fahrzeuge,HDV: Hybride,VP: Vehículos híbridos +data_map,option,Coal,Coal,Kohle,Charbon,Carbón +data_map,option,NuclearCap,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +data_map,option,Oil and Condensate,Oil and Condensate,Öl und Kondensat,Pétrole et condensats,Petróleo y condensados +data_map,option,All Coal,All Coal,Alle Kohle,Tout le charbon,Todo el carbón +data_map,option,Metallurgical,Metallurgical,Metallurgische Kohle,Métallurgie,Metalúrgico +data_map,option,Thermal,Thermal,Thermische Kohle,Thermique,Termal +data_map,option,Thermal & Metallurgical,Thermal & Metallurgical,Thermische und Metallurgische Kohle,Thermique et métallurgique,Termal y metalúrgico +data_map,option,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_map,option,All Aviation,All Aviation,Alle Luftfahrt,Aviation,Todo el sector de aviación +data_map,option,Freight,Freight,Freight,Fret,Carga +data_map,option,Passenger,Passenger,Passenger,Passager,Pasajero +data_map,option,Cement,Cement,Zement,Ciment,Cement +data_map,option,All Cement,All Cement,Alle Zement,Ciment,Todo el sector de cemento +data_map,option,Grinding,Grinding,Schleifen,Broyage,Triturado +data_map,option,Integrated Facility,Integrated Facility,Integrierte Anlage,Cimenterie intégrée,Sistema integrado +data_map,option,Steel,Steel,Stahl,Acier,Acero +data_map,option,All Steel,All Steel,Alle Stahl,Acier,Todo el sector de acero +data_map,option,Ac-Electric Arc Furnace,Ac-Electric Arc Furnace,AC-Elektrolichtbogenofen,AC - Four électrique à arc,Horno de arco eléctrico de CA +data_map,option,Dc-Electric Arc Furnace,Dc-Electric Arc Furnace,DC-Elektrolichtbogenofen,DC - Four électrique à arc,Horno de arco eléctrico de CC +data_map,option,Bof Shop,Basic Oxygen Furnace,LD-Verfahren,Procédé LD,Horno de oxígeno básico +data_map,option,Open Hearth Meltshop,Open hearth furnace,Schmelzbetrieb mit offenem Herd,Procédé Martin-Siemens,Horno a cielo abierto +data_map,unit,m3 per day,m3 per day,Kubikmeter pro Tag,m3 par jour,m3 por día +data_map,unit,boe per day,boe per day,Barrel Öläquivalent pro Tag,boe par jour,boe por día +data_map,unit,MW,MW,MW,MW,MW +data_map,unit,cars produced,cars produced,produzierte Autos,voitures produites,vehículos producidos +data_map,unit,vehicles produced,cars produced,produzierte Autos,voitures produites,vehículos producidos +data_map,unit,GJ,GJ,GJ,GJ,GJ +data_map,unit,tons of coal,tons of coal,Tonnen Kohle,tonnes de charbon,toneladas de cobre +data_map,unit,tons of steel,tons of steel,Tonnen Stahl,tonnes de Acier,toneladas de acero +data_map,unit,tons of cement,tons of cement,Tonnen Zement,tonnes de Ciment,toneladas de cemento +data_map,unit,active planes,active planes,aktive Flugzeuge,avions actifs,planes activos +data_map,group,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_map,group,Coal,Coal,Kohle,Charbon,Carbón +data_map,group,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_map,group,Power,Power,Energie,Energie,Energía +data_map,group,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_map,group,Cement,Cement,Zement,Ciment,Cement +data_map,group,Steel,Steel,Stahl,Acier,Acero +data_trajectory_alignment,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_trajectory_alignment,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_trajectory_alignment,equity_market,Global Market,Global Market,Globaler Markt,Marché mondial,Mercado Global +data_trajectory_alignment,equity_market,Developed Market,Developed Market,Entwickelter Markt,Marché développé,Mercado Desarrollado +data_trajectory_alignment,equity_market,Emerging Market,Emerging Market,Aufstrebender Markt,Marché émergent,Mercado Emergente +data_trajectory_alignment,scenario_geography,Global,Global,Global,Global,Global +data_trajectory_alignment,scenario_geography,Global Aggregate,Global Aggregate,Globales Aggregat,Agrégat mondial,Agregado Global +data_trajectory_alignment,allocation,Portfolio Weight,Portfolio Weight,Portfolio-Gewichtung,Poids du portefeuille,Peso en la cartera +data_trajectory_alignment,allocation,Ownership Weight,Ownership Weight,Gewicht des Eigentums,Poids de la propriété,"Peso, según enfoque de propiedad" +data_trajectory_alignment,ald_sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_trajectory_alignment,ald_sector,Coal,Coal,Kohle,Charbon,Carbón +data_trajectory_alignment,ald_sector,Oil&Gas,Oil&Gas,Öl&Gas,Pétrole et gaz,Petróleo y gas +data_trajectory_alignment,ald_sector,Power,Power,Energie,Energie,Energía +data_trajectory_alignment,technology,RenewablesCap,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables +data_trajectory_alignment,technology,HydroCap,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +data_trajectory_alignment,technology,NuclearCap,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +data_trajectory_alignment,technology,GasCap,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +data_trajectory_alignment,technology,OilCap,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +data_trajectory_alignment,technology,CoalCap,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +data_trajectory_alignment,technology,Electric,LDV: Electric,LDV: Elektrische,LDV: Électrique,VL: Vehículos eléctricos +data_trajectory_alignment,technology,Hybrid,LDV: Hybrid,LDV: Hybrid,LDV: Hybride,VL: Vehículos híbridos +data_trajectory_alignment,technology,ICE,LDV: ICE,LDV: Verbrennungsmotor,LDV: Moteur à combustion,VL: Vehículos de combustión interna +data_trajectory_alignment,technology,Oil,Oil,Öl,Pétrole,Petróleo +data_trajectory_alignment,technology,Gas,Gas,Gas,Gaz,Gas +data_trajectory_alignment,technology,FuelCell,LDV: Fuel Cell,LDV: Brennstoffzellen,LDV: Pile à combustible,VL: Vehículos de pilas de combustibles +data_trajectory_alignment,technology,Electric_HDV,HDV: Electric,HDV: Elektrisches,HDV: Electrique,VP: Vehículos eléctricos +data_trajectory_alignment,technology,FuelCell_HDV,HDV: Fuel Cell,HDV: Brennstoffzellen,HDV: Pile à combustible,VP: Vehículos de pilas de combustibles +data_trajectory_alignment,technology,Hybrid_HDV,HDV: Hybrid,HDV: Hybridantrieb,HDV: Hybride,VP: Vehículos híbridos +data_trajectory_alignment,technology,ICE_HDV,HDV: ICE,HDV: Verbrennungsmotor,HDV: Moteur à combustion,VP: Vehículos de combustión interna +data_trajectory_alignment,technology,Coal,Coal,Kohle,Charbon,Carbón +data_trajectory_alignment,unit,number of cars,number of cars,Anzahl der Autos,nombre de voitures,número de vehículos +data_trajectory_alignment,unit,GJ/a,GJ/a,GJ pro Jahr,GJ/a,GJ/a +data_trajectory_alignment,unit,MW,MW,MW,MW,MW +data_trajectory_alignment,unit,t/a,t/a,Tonnen pro Jahr,t/a,t/a +data_trajectory_alignment,scenario,production,production,Produktion,production,producción +data_trajectory_alignment,portfolio_name,pensionfund,Pension Fund Peer Group,Pensionsfonds Peergroup,Fonds de pensiongrupo de pares,Fondos de pensiones groupe de pairs +data_trajectory_alignment,portfolio_name,asset,Asset Manager Peer Group,Vermögensverwalter Peergroup,Gestionnaire d'actifs grupo de pares,Administrador de activos groupe de pairs +data_trajectory_alignment,portfolio_name,bank,Banking Peer Group,Bankwesen Peergroup,Banque grupo de pares,Banca groupe de pairs +data_trajectory_alignment,portfolio_name,insurance,Insurance Peer Group,Versicherung Peergroup,Assurance grupo de pares,Aseguradoras groupe de pairs +data_trajectory_alignment,portfolio_name,Meta Investor,Meta Investor Peer Group,Meta-Investor Peergroup,Méta-investisseur grupo de pares,Meta Inversionista groupe de pairs +data_trajectory_alignment,portfolio_name,Others,Others Peer Group,Anderen Peergroup,Autres grupo de pares,Otros groupe de pairs +data_trajectory_alignment,portfolio_name,Pension Funds and Insurances,Pension Funds and Insurances Peer Group,Pensionsfonds und Versicherung Peergroup,Fonds de pension et assurances grupo de pares,Fondos de pensiones groupe de pairs +data_trajectory_alignment,portfolio_name,Banks and Asset Managers,Banks and Asset Managers Peer Group,Banken und Vermögensverwalter Peergroup,Banques et gestionnaires d'actifs grupo de pares,Bancos y administradores de activos groupe de pairs +data_trajectory_alignment,portfolio_name,multimercado_alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao +data_trajectory_alignment,portfolio_name,multimercado_estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia +data_trajectory_alignment,portfolio_name,outros,Outros,Outros,Outros,Outros +data_trajectory_alignment,portfolio_name,renda_fixa_credito_privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado +data_trajectory_alignment,portfolio_name,acoes_indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados +data_trajectory_alignment,portfolio_name,acoes_esg,Acoes ESG,Acoes ESG,Acoes ESG,Acoes ESG +data_trajectory_alignment,portfolio_name,acoes_ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos +data_emissions,allocation,portfolio_weight,Portfolio Weight,Portfolio-Gewichtung,Poids du portefeuille,Peso en la cartera +data_emissions,allocation,ownership_weight,Ownership Weight,Gewicht des Eigentums,Poids de la propriété,"Peso, según enfoque de propiedad" +data_emissions,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_emissions,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_emissions,equity_market,Global Market,Global Market,Globaler Markt,Marché mondial,Mercado Global +data_emissions,equity_market,Developed Market,Developed Market,Entwickelter Markt,Marché développé,Mercado Desarrollado +data_emissions,equity_market,Emerging Market,Emerging Market,Aufstrebender Markt,Marché émergent,Mercado Emergente +data_emissions,sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_emissions,sector,Coal,Coal,Kohle,Charbon,Carbón +data_emissions,sector,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_emissions,sector,Power,Power,Energie,Energie,Energía +data_emissions,sector,Cement,Cement,Zement,Ciment,Cement +data_emissions,sector,Steel,Steel,Stahl,Acier,Acero +data_emissions,sector,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_emissions,sector,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +data_emissions,unit,tons of CO2 per km per cars produced,tons of CO2 per km per cars produced,Tonnen CO2 pro km pro produziertem Auto,tonnes de CO2 par km et par voiture produite,toneladas de CO2 por km por vehículos producidos +data_emissions,unit,tons of CO2 per tones of cement,tons of CO2 per tones of cement,Tonnen CO2 pro Tonne Zement,tonnes de CO2 par tonne de ciment,toneladas de CO2 por toneladas de cemento +data_emissions,unit,tons of CO2 per GJ,tons of CO2 per GJ,Tonnen CO2 pro GJ,tonnes de CO2 par GJ,toneladas de CO2 por GJ +data_emissions,unit,tons of CO2 per MWh,tons of CO2 per MWh,Tonnen CO2 pro MWh,tonnes de CO2 par MWh,toneladas de CO2 por MWh +data_emissions,unit,tons of CO2 per tons of steel,tons of CO2 per tons of steel,tons of CO2 prp Tonne Stahl,tonnes de CO2 par tonne d'acier,toneladas de CO2 por toneladas de acero +data_emissions,unit,tons of CO2 per passenger km per active planes,tons of CO2 per passenger km per active planes,Tonnen CO2 pro Passagierkilometer pro aktivem Flugzeug,tonnes de CO2 par passager/km par avion en activité,toneladas de CO2 por pasajero km por aviones activos +data_emissions,unit,tons of CO2 per tons of coal,tons of CO2 per tons of coal,Tonnen CO2 pro Tonnen Kohle,tonnes de CO2 par tonne de charbon,toneladas de CO2 por toneladas de carbón +data_company_bubble,ald_sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_company_bubble,ald_sector,Coal,Coal,Kohle,Charbon,Carbón +data_company_bubble,ald_sector,Oil&Gas,Oil&Gas,Öl&Gas,Pétrole et gaz,Petróleo y gas +data_company_bubble,ald_sector,Power,Power,Energie,Energie,Energía +data_company_bubble,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_company_bubble,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_key_bars_company,ald_sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_key_bars_company,ald_sector,Coal,Coal,Kohle,Charbon,Carbón +data_key_bars_company,ald_sector,Oil&Gas,Oil&Gas,Öl&Gas,Pétrole et gaz,Petróleo y gas +data_key_bars_company,ald_sector,Power,Power,Energie,Energie,Energía +data_key_bars_company,ald_sector,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_key_bars_company,ald_sector,Cement,Cement,Zement,Ciment,Cement +data_key_bars_company,ald_sector,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +data_key_bars_company,ald_sector,Steel,Steel,Stahl,Acier,Acero +data_key_bars_company,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_key_bars_company,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_key_bars_company,technology,Electric,LDV: Electric,LDV: Elektrische,LDV: Électrique,VL: Vehículos eléctricos +data_key_bars_company,technology,Hybrid,LDV: Hybrid,LDV: Hybrid,LDV: Hybride,VL: Vehículos híbridos +data_key_bars_company,technology,ICE,LDV: ICE,LDV: Verbrennungsmotor,LDV: Moteur à combustion,VL: Vehículos de combustión interna +data_key_bars_company,technology,FuelCell,LDV: Fuel Cell,LDV: Brennstoffzellen,LDV: Pile à combustible,VL: Vehículos de pilas de combustibles +data_key_bars_company,technology,Coal,Coal,Kohle,Charbon,Carbón +data_key_bars_company,technology,Gas,Gas,Gas,Gaz,Gas +data_key_bars_company,technology,Oil,Oil,Öl,Pétrole,Petróleo +data_key_bars_company,technology,CoalCap,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +data_key_bars_company,technology,GasCap,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +data_key_bars_company,technology,HydroCap,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +data_key_bars_company,technology,NuclearCap,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +data_key_bars_company,technology,OilCap,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +data_key_bars_company,technology,RenewablesCap,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables +data_key_bars_company,technology,Electric_HDV,HDV: Electric,HDV: Elektrisches,HDV: Electrique,VP: Vehículos eléctricos +data_key_bars_company,technology,FuelCell_HDV,HDV: Fuel Cell,HDV: Brennstoffzellen,HDV: Pile à combustible,VP: Vehículos de pilas de combustibles +data_key_bars_company,technology,Hybrid_HDV,HDV: Hybrid,HDV: Hybridantrieb,HDV: Hybride,VP: Vehículos híbridos +data_key_bars_company,technology,ICE_HDV,HDV: ICE,HDV: Verbrennungsmotor,HDV: Moteur à combustion,VP: Vehículos de combustión interna +data_key_bars_company,technology,Freight,Freight,Fracht,Fret,Carga +data_key_bars_company,technology,Mix,Mix,Mischen,Mix,Mixto +data_key_bars_company,technology,Other,Other,Andere,Autres,Otros +data_key_bars_company,technology,Passenger,Passenger,Passagier,Passager,Pasajero +data_key_bars_portfolio,ald_sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_key_bars_portfolio,ald_sector,Coal,Coal,Kohle,Charbon,Carbón +data_key_bars_portfolio,ald_sector,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_key_bars_portfolio,ald_sector,Power,Power,Energie,Energie,Energía +data_key_bars_portfolio,ald_sector,Aviation,Aviation,Luftfahrt,Aviation,Aviación +data_key_bars_portfolio,ald_sector,Cement,Cement,Zement,Ciment,Cement +data_key_bars_portfolio,ald_sector,Shipping,Shipping,Schifffahrt,Transport maritime,Transporte marítimo +data_key_bars_portfolio,ald_sector,Steel,Steel,Stahl,Acier,Acero +data_key_bars_portfolio,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_key_bars_portfolio,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_key_bars_portfolio,technology,Electric,LDV: Electric,LDV: Elektrische,LDV: Électrique,VL: Vehículos eléctricos +data_key_bars_portfolio,technology,Hybrid,LDV: Hybrid,LDV: Hybrid,LDV: Hybride,VL: Vehículos híbridos +data_key_bars_portfolio,technology,ICE,LDV: ICE,LDV: Verbrennungsmotor,LDV: Moteur à combustion,VL: Vehículos de combustión interna +data_key_bars_portfolio,technology,FuelCell,LDV: Fuel Cell,LDV: Brennstoffzellen,LDV: Pile à combustible,VL: Vehículos de pilas de combustibles +data_key_bars_portfolio,technology,Coal,Coal,Kohle,Charbon,Carbón +data_key_bars_portfolio,technology,Gas,Gas,Gas,Gaz,Gas +data_key_bars_portfolio,technology,Oil,Oil,Öl,Pétrole,Petróleo +data_key_bars_portfolio,technology,CoalCap,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +data_key_bars_portfolio,technology,GasCap,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +data_key_bars_portfolio,technology,HydroCap,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +data_key_bars_portfolio,technology,NuclearCap,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +data_key_bars_portfolio,technology,OilCap,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +data_key_bars_portfolio,technology,RenewablesCap,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables +data_key_bars_portfolio,technology,Electric_HDV,HDV: Electric,HDV: Elektrisches,HDV: Électrique,VP: Vehículos eléctricos +data_key_bars_portfolio,technology,FuelCell_HDV,HDV: Fuel Cell,HDV: Brennstoffzellen,HDV: Pile à combustible,VP: Vehículos de pilas de combustibles +data_key_bars_portfolio,technology,Hybrid_HDV,HDV: Hybrid,HDV: Hybridantrieb,HDV: Hybride,VP: Vehículos híbridos +data_key_bars_portfolio,technology,ICE_HDV,HDV: ICE,HDV: Verbrennungsmotor,HDV: Moteur à combustion,VP: Vehículos de combustión interna +data_key_bars_portfolio,technology,Freight,Freight,Fracht,Fret,Carga +data_key_bars_portfolio,technology,Mix,Mix,Mischen,Mix,Mixto +data_key_bars_portfolio,technology,Other,Other,Andere,Autres,Otros +data_key_bars_portfolio,technology,Passenger,Passenger,Passagier,Passager,Pasajero +data_key_bars_portfolio,id,Portfolio,Portfolio,Portfolio,Portefeuille,Portafolio +data_key_bars_portfolio,id,Aligned* Portfolio,Aligned* Portfolio,Ausgerichtetes* Portfolio,Portefeuille aligné*,Portafolio alineado* +data_peercomparison,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_peercomparison,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_peer_bubbles,ald_sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_peer_bubbles,ald_sector,Coal,Coal,Kohle,Charbon,Carbón +data_peer_bubbles,ald_sector,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_peer_bubbles,ald_sector,Power,Power,Energie,Energie,Energía +data_peer_bubbles,asset_class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_peer_bubbles,asset_class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_peer_bubbles,peer_group,pensionfund,Pension Fund Peer Group,Pensionsfonds Peergroup,Fonds de pensiongrupo de pares,Fondos de pensiones groupe de pairs +data_peer_bubbles,peer_group,assetmanager,Asset Manager Peer Group,Vermögensverwalter Peergroup,Gestionnaire d'actifs grupo de pares,Administrador de activos groupe de pairs +data_peer_bubbles,peer_group,bank,Banking Peer Group,Bankwesen Peergroup,Banque grupo de pares,Banca groupe de pairs +data_peer_bubbles,peer_group,insurance,Insurance Peer Group,Versicherung Peergroup,Assurance grupo de pares,Aseguradoras groupe de pairs +data_peer_bubbles,peer_group,Meta Investor,Meta Investor Peer Group,Meta-Investor Peergroup,Méta-investisseur grupo de pares,Meta Inversionista groupe de pairs +data_peer_bubbles,peer_group,Others,Others Peer Group,Anderen Peergroup,Autres grupo de pares,Otros groupe de pairs +data_peer_bubbles,peer_group,Pension Funds and Insurances,Pension Funds and Insurances Peer Group,Pensionsfonds und Versicherung Peergroup,Fonds de pension et assurances grupo de pares,Fondos de pensiones groupe de pairs +data_peer_bubbles,peer_group,Banks and Asset Managers,Banks and Asset Managers Peer Group,Banken und Vermögensverwalter Peergroup,Banques et gestionnaires d'actifs grupo de pares,Bancos y administradores de activos groupe de pairs +data_peer_bubbles,peer_group,multimercado_alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao,Multimercado Alocacao +data_peer_bubbles,peer_group,multimercado_estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia,Multimercado Estrategia +data_peer_bubbles,peer_group,outros,Outros,Outros,Outros,Outros +data_peer_bubbles,peer_group,renda_fixa_credito_privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado,Renda Fixa Credito Privado +data_peer_bubbles,peer_group,acoes_indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados,Acoes Indexados +data_peer_bubbles,peer_group,acoes_esg,Acoes ESG,Acoes ESG,Acoes ESG,Acoes ESG +data_peer_bubbles,peer_group,acoes_ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos,Acoes Ativos +data_peer_table,Asset Class,Corporate Bonds,Corporate Bonds,Unternehmensanleihen,Obligations d'entreprises,Bonos corporativos +data_peer_table,Asset Class,Listed Equity,Listed Equity,Aktien,Actions,Acciones +data_peer_table,Sector,Automotive,Automotive,Automobilindustrie,Industrie automobile,Automotriz +data_peer_table,Sector,Coal,Coal,Kohle,Charbon,Carbón +data_peer_table,Sector,Oil&Gas,Oil & Gas,Öl & Gas,Pétrole et gaz,Petróleo y gas +data_peer_table,Sector,Power,Power,Energie,Energie,Energía +data_peer_table,Technology,Electric,LDV: Electric,LDV: Elektrische,LDV: Électrique,VL: Vehículos eléctricos +data_peer_table,Technology,Hybrid,LDV: Hybrid,LDV: Hybrid,LDV: Hybride,VL: Vehículos híbridos +data_peer_table,Technology,ICE,LDV: ICE,LDV: Verbrennungsmotor,LDV: Moteur à combustion,VL: Vehículos de combustión interna +data_peer_table,Technology,Coal,Coal,Kohle,Charbon,Carbón +data_peer_table,Technology,Gas,Gas,Gas,Gaz,Gas +data_peer_table,Technology,Oil,Oil,Öl,Pétrole,Petróleo +data_peer_table,Technology,CoalCap,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +data_peer_table,Technology,GasCap,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +data_peer_table,Technology,HydroCap,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +data_peer_table,Technology,NuclearCap,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +data_peer_table,Technology,OilCap,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +data_peer_table,Technology,RenewablesCap,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables +data_peer_table,Technology,Coal Power,Coal Power,Kohlekraft,Energie à base de charbon,Energía a base de carbón +data_peer_table,Technology,Gas Power,Gas Power,Gaskraft,Energie à base de gaz,Energía a base de gas +data_peer_table,Technology,Hydro Power,Hydropower,Wasserkraft,Energie hydraulique,Energía hidroeléctrica +data_peer_table,Technology,Nuclear Power,Nuclear Power,Kernenergie,Energie nucléaire,Energía nuclear +data_peer_table,Technology,Oil Power,Oil Power,Öl-Power,Energie à base de pétrole,Energía a base de petróleo +data_peer_table,Technology,Renewables Power,Renewables,Erneuerbare Energien,Energie renouvelable,Energías Renovables diff --git a/inst/extdata/translation/js_labels.json b/inst/extdata/translation/js_labels.json new file mode 100644 index 0000000..36638e3 --- /dev/null +++ b/inst/extdata/translation/js_labels.json @@ -0,0 +1,810 @@ +[ + { + "id": "default_opts", + "label": "no_data_message", + "en": "This portfolio does not contain holdings relevant to this section of the report, therefore no graph could be produced. An example graph can be viewed ", + "de": "Dieses Portfolio enthält keine Bestände, die für diesen Abschnitt des Berichts relevant sind, daher konnte keine Grafik erstellt werden. Ein Beispieldiagramm finden Sie ", + "fr": "Ce portefeuille ne contient pas de participations pertinentes pour cette section du rapport, donc aucun graphique n'a pu être produit. Un exemple de graphique peut être consulté ", + "es": "Este portafolio no contiene participaciones relevantes para esta sección del informe, por lo que no se ha podido elaborar ningún gráfico. Un ejemplo de gráfico puede verse " + }, + { + "id": "default_opts", + "label": "here", + "en": "here.", + "de": "hier.", + "fr": "ici.", + "es": "aquí." + }, + { + "id": "default_opts", + "label": "on_error_message", + "en": "An error was encountered for this chart and it can't be displayed. Please, let us know about the error using the 'Give feedback' button on the right. Changing browsers may alleviate this issue temporarily while we work on a longer-term solution.", + "de": "Es ist ein Fehler aufgetreten, der mit ihrem Internet-Browser zusammenhängt. Wir arbeiten derzeit an der Lösung des Problems. Bis das Problem behoben wurde kann das Problem durch die Nutzung eines anderen Browsers umgangen werden.", + "fr": "Une erreur s'est produite dans ce graphique et il ne peut pas être affiché. Veuillez nous en informer en utilisant le bouton 'Donnez votre avis' sur la droite. Le changement de navigateur peut atténuer temporairement ce problème pendant que nous travaillons sur une solution à plus long terme.", + "es": "Se encontró un error para este gráfico y no se puede mostrar. Por favor, avísenos sobre el error usando el botón 'Enviar comentarios' a la derecha. Cambiar de navegador puede aliviar este problema temporalmente mientras trabajamos en una solución a más largo plazo." + }, + { + "id": "default_opts", + "label": "feedback_message", + "en": "Thank you for your feedback! Your answer has been recorded'", + "de": "Vielen Dank für Ihr Feedback! Ihre Antwort wurde aufgezeichnet.", + "fr": "Merci pour vos commentaires ! Votre réponse a été enregistrée.", + "es": "¡Gracias por sus comentarios! Su respuesta ha sido grabada." + }, + { + "id": "default_opts", + "label": "listed_equity", + "en": "Listed Equity", + "de": "Aktien", + "fr": "Actions", + "es": "Acciones" + }, + { + "id": "default_opts", + "label": "corporate_bonds", + "en": "Corporate Bonds", + "de": "Unternehmensanleihen", + "fr": "Obligations d'entreprises", + "es": "Bonos corporativos" + }, + { + "id": "default_opts", + "label": "sector_emissions", + "en": "tonnes CO2<\/sub> emissions", + "de": "Tonnen CO2<\/sub>-Emissionen", + "fr": "tonnes d'émissions de CO2<\/sub>", + "es": "toneladas de emisiones de CO2<\/sub>" + }, + { + "id": "default_opts", + "label": "global_market", + "en": "Global Market", + "de": "Globaler Markt", + "fr": "Marché mondial", + "es": "Mercado Global" + }, + { + "id": "default_opts", + "label": "all_automotive", + "en": "All Automotive", + "de": "Automobilindustrie (Alle)", + "fr": "L'industrie automobile (globale)", + "es": "Todo el sector automotriz" + }, + { + "id": "default_opts", + "label": "ice", + "en": "ICE", + "de": "Verbrennungsmotor", + "fr": "Moteur à combustion interne", + "es": "Vehículos de combustión interna" + }, + { + "id": "default_opts", + "label": "automotive", + "en": "Automotive", + "de": "Automobilindustrie", + "fr": "Industrie automobile", + "es": "Automotriz" + }, + { + "id": "default_opts", + "label": "equity", + "en": "Equity", + "de": "Aktien", + "fr": "Actions", + "es": "Acciones" + }, + { + "id": "default_opts", + "label": "bonds", + "en": "Bonds", + "de": "Unternehmensanleihen", + "fr": "Obligations", + "es": "Corporate bonds" + }, + { + "id": "pie", + "label": "comment", + "en": [" of the _PORT_ portfolio", "covered by PACTA"], + "de": [" des Portfolios der _PORT_", "durch PACTA abgedeckt"], + "fr": [" du portefeuille d'_PORT_", "est couvert par PACTA"], + "es": [" _PORT_ del portafolio", "está cubierto por PACTA"] + }, + { + "id": "pie", + "label": "asset_class", + "en": { + "equity": "Equity", + "bonds": "Bonds" + }, + "de": { + "equity": "Aktien", + "bonds": "Unternehmensanleihen" + }, + "fr": { + "equity": "actions", + "bonds": "obligations" + }, + "es": { + "equity": "Acciones", + "bonds": "Bonos corporativos" + } + }, + { + "id": "pie", + "label": "numbers_long", + "en": { + "M": " million", + "G": " billion", + "T": " trillion" + }, + "de": { + "M": " Million", + "G": " Milliarde", + "T": " Billion" + }, + "fr": { + "M": " Million", + "G": " Milliard", + "T": " Billion" + }, + "es": { + "M": " millones", + "G": " miles de millones", + "T": " bilones" + } + }, + { + "id": "value_pie", + "label": "title", + "en": ": Financial exposure to climate relevant sectors", + "de": ": Finanzielle Exposition gegenüber klimarelevanten Sektoren", + "fr": ": Exposition financières aux secteurs clés pour le climat", + "es": ": Exposición financiera a sectores relevantes para el clima" + }, + { + "id": "emissions_pie", + "label": "title", + "en": ": Emissions exposure from climate relevant sectors", + "de": ": Emissionen durch klimarelevante Sektoren", + "fr": ": Exposition aux emissions des secteurs relatifs au climat", + "es": ": Exposición a emisiones de sectores relevantes para el clima" + }, + { + "id": "techexposure", + "label": "title_what", + "en": ": Technology mix ", + "de": ": Technologiemix ", + "fr": ": Mix technologique ", + "es": ": Combinación tecnológica " + }, + { + "id": "techexposure", + "label": "title_opts_how", + "en": { + "opt_asset": "as % of assets under management", + "opt_sec": "as % of sector" + }, + "de": { + "opt_asset": "in % des verwalteten Vermögens", + "opt_sec": "in % des Sektors" + }, + "fr": { + "opt_asset": "en % des actifs sous gestion", + "opt_sec": "en % du secteur" + }, + "es": { + "opt_asset": "como % de los activos bajo gestión", + "opt_sec": "como % del sector" + } + }, + { + "id": "techexposure", + "label": "title_how", + "en": " compared to ", + "de": " im Vergleich zu ", + "fr": " comparé à ", + "es": " comparado con " + }, + { + "id": "techexposure", + "label": "caption_market", + "en": "Equity market: ", + "de": "Aktienmarkt: ", + "fr": "Marché boursier: ", + "es": "Mercado de acciones: " + }, + { + "id": "techexposure", + "label": "port_label", + "en": "This portfolio", + "de": "Dieses Portfolio", + "fr": "Ce portefeuille", + "es": "Este portafolio" + }, + { + "id": "techexposure", + "label": "comp_label", + "en": "Benchmark", + "de": "Benchmark", + "fr": "Référence", + "es": "Portafolio de Referencia" + }, + { + "id": "techexposure", + "label": "hover_over_asset", + "en": " of assets under management
", + "de": " der verwalteten Vermögen
", + "fr": " des actifs sous gestion
", + "es": " de los activos bajo gestión
" + }, + { + "id": "techexposure", + "label": "hover_over_sec", + "en": { + "before_sec": " of ", + "after_sec": " sector" + }, + "de": { + "before_sec": " von ", + "after_sec": " Sektor" + }, + "fr": { + "before_sec": " de ", + "after_sec": " secteur" + }, + "es": { + "before_sec": " del ", + "after_sec": " sector" + } + }, + { + "id": "techexposure", + "label": "hover_over_low_carbon", + "en": { + "before_sec": "Low-carbon ", + "after_sec": " technologies" + }, + "de": { + "before_sec": "Kohlenstoffarm ", + "after_sec": " Technologien" + }, + "fr": { + "before_sec": "Bas-carbone ", + "after_sec": " technologies" + }, + "es": { + "before_sec": "Tecnologías ", + "after_sec": " bajas en carbono" + } + }, + { + "id": "techexposure", + "label": "green_legend_label", + "en": { + "top": "Low-carbon technologies", + "bottom": "within a sector" + }, + "de": { + "top": "Kohlenstoffarm Technologien", + "bottom": "innerhalb eines Sektors" + }, + "fr": { + "top": "Bas-carbone technologies", + "bottom": "dans un secteur" + }, + "es": { + "top": "Tecnologías bajas en carbono", + "bottom": "dentro de un sector" + } + }, + { + "id": "techexposure_future", + "label": "title_up", + "en": ": Future technology mix as % of sector based on ", + "de": ": Zukünftiger Technologiemix in % des Sektors basierend auf dem ", + "fr": ": Mix technologique futur en % du secteur sur la base du ", + "es": ": Combinación tecnolófica futura como% del sector basado en " + }, + { + "id": "techexposure_future", + "label": "title_scenario", + "en": " scenario", + "de": " Szenario", + "fr": " scénario", + "es": " escenario" + }, + { + "id": "techexposure_future", + "label": "title_down", + "en": "compared to ", + "de": "im Vergleich zu ", + "fr": "comparé à ", + "es": "comparado con " + }, + { + "id": "techexposure_future", + "label": "title_market", + "en": " as a subset of ", + "de": " als eine Teilmenge des ", + "fr": " comme un sous-ensemble du ", + "es": " como un subconjunto de " + }, + { + "id": "techexposure_future", + "label": "hover_over_sec", + "en": { + "before_sec": " of ", + "after_sec": " sector" + }, + "de": { + "before_sec": " von ", + "after_sec": " Sektor" + }, + "fr": { + "before_sec": " de ", + "after_sec": " secteur" + }, + "es": { + "before_sec": " del ", + "after_sec": " sector" + } + }, + { + "id": "trajectory_alignment", + "label": "title_what", + "en": ": Production trajectory of ", + "de": ": Produktionsverlauf von ", + "fr": ": Trajectoire de production de ", + "es": ": Trayectoria de producción de " + }, + { + "id": "trajectory_alignment", + "label": "title_how", + "en": " compared to ", + "de": " im Vergleich zu ", + "fr": " comparé à ", + "es": " comparado con " + }, + { + "id": "trajectory_alignment", + "label": "caption_alloc", + "en": "Allocation method: ", + "de": "Zuweisungsmethode: ", + "fr": "Méthode de répartition: ", + "es": "Método de alocación: " + }, + { + "id": "trajectory_alignment", + "label": "caption_market", + "en": "Equity market: ", + "de": "Aktienmarkt: ", + "fr": "Marché boursier: ", + "es": "Mercado de acciones: " + }, + { + "id": "trajectory_alignment", + "label": "caption_geography", + "en": "Scenario geography: ", + "de": "Szenario-Geographie: ", + "fr": "Géographie des scénarios: ", + "es": "Geografía de escenarios: " + }, + { + "id": "trajectory_alignment", + "label": "caption_source", + "en": "Scenario source: ", + "de": "Szenarioquelle: ", + "fr": "Source du scénario: ", + "es": "Fuente de escenario: " + }, + { + "id": "trajectory_alignment", + "label": "ytitle", + "en": " production in ", + "de": " Produktion in ", + "fr": " Production en ", + "es": " producción en " + }, + { + "id": "trajectory_alignment", + "label": "portfolio_label", + "en": "Portfolio", + "de": "Portfolio", + "fr": "Portefeuille", + "es": "Portafolio" + }, + { + "id": "trajectory_alignment", + "label": "benchmark_label", + "en": "Benchmark", + "de": "Benchmark", + "fr": "Référence", + "es": "Portafolio de referencia" + }, + { + "id": "trajectory_alignment", + "label": "label_dots_legend", + "en": {"top": "Yearly production", "bottom": "volume"}, + "de": {"top": "Jährliche", "bottom": "Produktionsmenge"}, + "fr": {"top": "Volume annuel", "bottom": "de production"}, + "es": {"top": "Volumen anual", "bottom": "de producción"} + }, + { + "id": "trajectory_alignment", + "label": "footnote", + "en": "* Start date of the analysis.", + "de": "* Startdatum der Analyse.", + "fr": "* Date de début de l'analyse.", + "es": "* Fecha de inicio del análisis." + }, + { + "id": "trajectory_alignment", + "label": "hoverover_value_label", + "en": "(Planned) yearly production: ", + "de": "(Geplante) jährliche Produktion: ", + "fr": "Production annuelle (prévisionnelle): ", + "es": "Producción anual (prevista): " + }, + { + "id": "map", + "label": "title_what", + "en": "Regional exposure of ", + "de": "Regionale Exposition von ", + "fr": "Exposition régionale de ", + "es": "Exposición reginal de " + }, + { + "id": "map", + "label": "title_how", + "en": " towards ", + "de": " in Richtung ", + "fr": " vers ", + "es": " hacia " + }, + { + "id": "emissions_time_line", + "label": "title_what", + "en": ": 5-year emission intensity trend of ", + "de": ": 5-Jahres-Emissionsintensitäts-Trend von ", + "fr": ": Tendance des émissions sur 5 ans de ", + "es": ": Tendencia de intensidad de emisiones de 5 años de " + }, + { + "id": "emissions_time_line", + "label": "caption_alloc", + "en": "Allocation method: ", + "de": "Zuweisungsmethode: ", + "fr": "Méthode de répartition: ", + "es": "Método de alocación: " + }, + { + "id": "emissions_time_line", + "label": "caption_market", + "en": "Equity market: ", + "de": "Aktienmarkt: ", + "fr": "Marché boursier: ", + "es": "Mercado de acciones: " + }, + { + "id": "emissions_time_line", + "label": "scen_label", + "en": "Scenario", + "de": "Szenario", + "fr": "Scénario", + "es": "Escenario" + }, + { + "id": "emissions_time_line", + "label": "port_label", + "en": "Portfolio", + "de": "Portfolio", + "fr": "Portefeuille", + "es": "Portafolio" + }, + { + "id": "emissions_time_line", + "label": "hoverover_value", + "en": "Value: ", + "de": "Wert: ", + "fr": "Valeur: ", + "es": "Valor: " + }, + { + "id": "emissions_time_line", + "label": "footnote", + "en": "* Start date of the analysis.", + "de": "* Startdatum der Analyse.", + "fr": "* Date de début de l'analyse.", + "es": "* Fecha de inicio del análisis." + }, + { + "id": "peercomparison", + "label": "title", + "en": ": Exposure to high-carbon economic activities sorted by ", + "de": ": Exposition gegenüber kohlenstoffintensiver wirtschaftlicher Aktivität sortiert nach ", + "fr": ": Exposition aux activités à haute teneur en carbone triée par ", + "es": ": Exposición a actividades económicas con alto contenido de carbono ordenadas por " + }, + { + "id": "peercomparison", + "label": "ytitle", + "en": "% of assets under management", + "de": "% des verwalteten Vermögens", + "fr": "% des actifs sous gestion", + "es": "como % de los activos bajo gestión" + }, + { + "id": "peercomparison", + "label": "port_label", + "en": "This portfolio", + "de": "Dieses Portfolio", + "fr": "Ce Portefeuille", + "es": "Este portafolio" + }, + { + "id": "peercomparison", + "label": "categories", + "en": { + "High-carbon Transportion": "High-carbon Transportion", + "High-carbon Power Production": "High-carbon Power Production", + "High-carbon Industry": "High-carbon Industry", + "Fossil Fuels": "Fossil Fuels" + }, + "de": { + "High-carbon Transportion": "Emissionsintensives Transportwesen", + "High-carbon Power Production": "Emissionsintensive Stromerzeugung", + "High-carbon Industry": "Kohlenstoffintensive Industrie", + "Fossil Fuels": "Fossile Brennstoffe" + }, + "fr": { + "High-carbon Transportion": "Transport à haute teneur en carbone", + "High-carbon Power Production": "Production d'électricité à haute teneur en carbone", + "High-carbon Industry": "Industrie à forte teneur de carbone", + "Fossil Fuels": "Combustibles fossiles" + }, + "es": { + "High-carbon Transportion": "Transporte con alto contenido de carbono", + "High-carbon Power Production": "Producción de energía con alto contenido de carbono", + "High-carbon Industry": "Industria con alto contenido de carbono", + "Fossil Fuels": "Combustibles fósiles" + } + }, + { + "id": "peercomparison", + "label": "total", + "en": "All technologies", + "de": "Alle emissionsintensiven Technologien", + "fr": "Toutes les technologies", + "es": "Todas las tecnologías" + }, + { + "id": "company_bubble", + "label": "title_what", + "en": ": Current low carbon technology share vs. future scenario compatibility of planned production of ", + "de": ": Aktueller Anteil kohlenstoffarmer Technologien im Vergleich zur Kompatibilität der geplanten Produktion der ", + "fr": ": Part actuelle des technologies à faible émission de carbone par rapport à la compatibilité du scénario futur de la production prévue des entreprises ", + "es": ": Cuota actual de la tecnología de baja emisión de carbono frente a la compatibilidad con el escenario futuro de la producción prevista de las empresas de " + }, + { + "id": "company_bubble", + "label": "title_what_after", + "en": " companies in this portfolio.", + "de": "unternehmen in diesem Portfolio.", + "fr": " de ce portefeuille.", + "es": " en esta cartera." + }, + { + "id": "company_bubble", + "label": "xtitle", + "en": "Current capacity in low-carbon technologies", + "de": "Derzeitige Kapazitäten im Bereich kohlenstoffarmer Technologien", + "fr": "Actuelle capacité en technologies à faible émission de carbone", + "es": "Capacidad actual en tecnologías de baja emisión de carbono" + }, + { + "id": "company_bubble", + "label": "xsubtitle", + "en": "(as % of sector production capacity)", + "de": "(in % der Produktionskapazität des Sektors)", + "fr": "(en % de la capacité de production du secteur)", + "es": "(como % de la capacidad de producción del sector)" + }, + { + "id": "company_bubble", + "label": "ytitle", + "en": "Planned new capacity in low carbon technologies", + "de": "Geplante neue Kapazitäten für kohlenstoffarme Technologien", + "fr": "Nouvelles capacités dans les technologies vertes", + "es": "Nuevas capacidades previstas en tecnologías de baja emisión de carbono" + }, + { + "id": "company_bubble", + "label": "ysubtitle", + "en": "(as a % of the scenario* target for YEAR)", + "de": "(in % des Szenarioziels* für YEAR)", + "fr": "(en % de l'objectif du scénario* pour YEAR)", + "es": "(como % del objetivo del escenario* para YEAR)" + }, + { + "id": "company_bubble", + "label": "ztooltip", + "en": "Weight in portfolio (% of AUM)", + "de": "Gewicht im Portfolio (% der AUM)", + "fr": "Poids dans le portefeuille (% des ASG)", + "es": "Peso en el portafolio (como % de ABG)" + }, + { + "id": "company_bubble", + "label": "legend_title", + "en": "Portfolio weight", + "de": "Portfoliogewicht", + "fr": "Poids du portefeuille", + "es": "Peso en el portafolio" + }, + { + "id": "company_bubble", + "label": "footnote", + "en": "Scenario: ", + "de": "Szenario: ", + "fr": "Scénario: ", + "es": "Escenario: " + }, + { + "id": "stackedbars_key_drivers", + "label": "title_what", + "en": ": Future technology mix for the largest holdings (by portfolio weight)", + "de": ": Zukünftiger Technologiemix für die größten Beteiligungen (nach Portfoliogewicht)", + "fr": ": Mix technologique futur pour les plus grandes participations (par part du portefeuille)", + "es": ": Combinación tecnológica futura para las mayores empresas participaciones (por peso de la cartera)" + }, + { + "id": "stackedbars_key_drivers", + "label": "title_how", + "en": "as % of sector for ", + "de": "in % des Sektors für ", + "fr": "en % du secteur pour ", + "es": "como % del sector para " + }, + { + "id": "stackedbars_key_drivers", + "label": "title_who", + "en": " sector.", + "de": " Sector.", + "fr": " secteur.", + "es": " sector." + }, + { + "id": "stackedbars_key_drivers", + "label": "weights", + "en": "Weights", + "de": "Gewichte", + "fr": "Poids", + "es": "Pesos" + }, + { + "id": "stackedbars_key_drivers", + "label": "hover_over_sec", + "en": { + "before_sec": " of ", + "after_sec": " sector" + }, + "de": { + "before_sec": " von ", + "after_sec": " Sektor" + }, + "fr": { + "before_sec": " de ", + "after_sec": " secteur" + }, + "es": { + "before_sec": " del ", + "after_sec": " sector" + } + }, + { + "id": "stackedbars_key_drivers", + "label": "footnote_lab", + "en": { + "before_scen": "* Aligned to scenario ", + "after_scen": " in year ", + "after_year": "." + }, + "de": { + "before_scen": "* Ausgerichtet auf das Szenario ", + "after_scen": " im Jahr ", + "after_year": "." + }, + "fr": { + "before_scen": "* Aligné sur le scénario ", + "after_scen": " de l'année ", + "after_year": "." + }, + "es": { + "before_scen": "* Alineado con el escenario ", + "after_scen": " en el año ", + "after_year": "." + } + }, + { + "id": "peer_bubbles", + "label": "xtitle", + "en": "Current capacity in low-carbon technologies", + "de": "Derzeitige Kapazitäten im Bereich kohlenstoffarmer Technologien", + "fr": "Actuelle capacité en technologies à faible émission de carbone", + "es": "Capacidad actual en tecnologías de baja emisión de carbono" + }, + { + "id": "peer_bubbles", + "label": "xsubtitle", + "en": "(as % of sector production capacity)", + "de": "(in % der Produktionskapazität des Sektors)", + "fr": "(en % de la capacité de production du secteur)", + "es": "(como % de la capacidad de producción del sector)" + }, + { + "id": "peer_bubbles", + "label": "ytitle", + "en": "Planned new capacity in low carbon technologies", + "de": "Geplante neue Kapazitäten für kohlenstoffarme Technologien", + "fr": "Nouvelles capacités dans les technologies vertes", + "es": "Nuevas capacidades previstas en tecnologías de baja emisión de carbono" + }, + { + "id": "peer_bubbles", + "label": "ysubtitle", + "en": "(as a % of the scenario* target for YEAR)", + "de": "(in % des Szenarioziels* für YEAR)", + "fr": "(en % de l'objectif du scénario* pour YEAR)", + "es": "(como % del objetivo del escenario* para YEAR)" + }, + { + "id": "peer_bubbles", + "label": "title_what", + "en": ": Current low carbon technology share vs. future scenario compatibility of planned production of ", + "de": ": Aktueller Anteil kohlenstoffarmer Technologien vs. Kompatibilität des Zukunftsszenarios der geplanten Produktion des ", + "fr": ": Part actuelle des technologies à faible émission de carbone par rapport à la compatibilité du scénario futur de la production prévue du portefeuille ", + "es": ": Cuota actual de la tecnología de baja emisión de carbono frente a la compatibilidad con el escenario futuro de la producción prevista de la cartera de " + }, + { + "id": "peer_bubbles", + "label": "title_with_whom", + "en": " portfolio compared to: ", + "de": " portfolios im Vergleich zu: ", + "fr": " par rapport à ", + "es": " en comparación con: " + }, + { + "id": "peer_bubbles", + "label": "port_label", + "en": "This portfolio", + "de": "Dieses Portfolio", + "fr": "Ce Portefeuille", + "es": "Este portafolio" + }, + { + "id": "peer_bubbles", + "label": "comp_label", + "en": "Benchmark", + "de": "Benchmark", + "fr": "Référence", + "es": "Portafolio de referencia" + }, + { + "id": "peer_bubbles", + "label": "all_label", + "en": "All participants", + "de": "alle Teilnehmer", + "fr": "Tous les participants", + "es": "Todos los participantes" + }, + { + "id": "peer_bubbles", + "label": "footnote", + "en": "Scenario: ", + "de": "Szenario: ", + "fr": "Scénario: ", + "es": "Escenario: " + } +] diff --git a/inst/extdata/translation/update_translations.R b/inst/extdata/translation/update_translations.R new file mode 100644 index 0000000..d4ed425 --- /dev/null +++ b/inst/extdata/translation/update_translations.R @@ -0,0 +1,35 @@ +# This script reads the translation files, and exports them to a table, +# so that a translator can add new translations, and allows for those +# translations to be added back into these files. + +new_language <- "es" + +library("jsonlite") + +json_text <- jsonlite::read_json( + "js_labels.json", + simplifyDataFrame = TRUE +) + +replace_count <- 1 +replace_strings <- function(x, replacement = "CHANGEME") { + if (length(x) > 1) { + for (ind in seq_along(x)) { + x[[ind]] <- replace_strings(x[[ind]]) + } + } else if (is.character(x)) { + x <- paste(replacement, "JSLABELS", replace_count, sep = "-") + replace_count <<- replace_count + 1 + } else { + if (interactive()) { + browser() + } + stop("unknown object type") + } + return(x) +} + +translated_json <- json_text +translated_json[[new_language]] <- replace_strings(translated_json[["en"]]) + +write_json(translated_json, "js_labels.json", pretty = TRUE, auto_unbox = TRUE) diff --git a/main.R b/main.R deleted file mode 100644 index caf419b..0000000 --- a/main.R +++ /dev/null @@ -1,733 +0,0 @@ -library(dplyr) -library(jsonlite) -library(pacta.portfolio.report) -library(pacta.portfolio.utils) -library(readr) -library(tidyr) - -prep_techmix_sector <- - function(equity_results_portfolio, - bonds_results_portfolio, - indices_equity_results_portfolio, - indices_bonds_results_portfolio, - peers_equity_results_portfolio, - peers_bonds_results_portfolio, - investor_name, - portfolio_name, - start_year, - year_span, - peer_group, - green_techs, - all_tech_levels - ) { - - portfolio <- - list(`Listed Equity` = equity_results_portfolio, - `Corporate Bonds` = bonds_results_portfolio) %>% - bind_rows(.id = "asset_class") %>% - filter(.data$investor_name == .env$investor_name, - .data$portfolio_name == .env$portfolio_name) %>% - filter(!is.na(.data$ald_sector)) - -asset_classes <- - portfolio %>% - pull("asset_class") %>% - unique() - -equity_sectors <- - portfolio %>% - filter(.data$asset_class == "Listed Equity") %>% - filter(.data$allocation == "portfolio_weight") %>% - pull("ald_sector") %>% - unique() - -bonds_sectors <- - portfolio %>% - filter(.data$asset_class == "Corporate Bonds") %>% - pull("ald_sector") %>% - unique() - -indices <- - list(`Listed Equity` = indices_equity_results_portfolio, - `Corporate Bonds` = indices_bonds_results_portfolio) %>% - bind_rows(.id = "asset_class") %>% - filter(.data$asset_class %in% .env$asset_classes) %>% - filter(.data$asset_class == "Listed Equity" & .data$ald_sector %in% .env$equity_sectors | - .data$asset_class == "Corporate Bonds" & .data$ald_sector %in% .env$bonds_sectors) - -peers <- - list(`Listed Equity` = peers_equity_results_portfolio, - `Corporate Bonds` = peers_bonds_results_portfolio) %>% - bind_rows(.id = "asset_class") %>% - filter(.data$asset_class %in% .env$asset_classes) %>% - filter(.data$asset_class == "Listed Equity" & .data$ald_sector %in% .env$equity_sectors | - .data$asset_class == "Corporate Bonds" & .data$ald_sector %in% .env$bonds_sectors) %>% - filter(.data$investor_name == .env$peer_group) - -techexposure_data <- - bind_rows(portfolio, peers, indices) %>% - filter(.data$allocation == "portfolio_weight") %>% - filter(.data$scenario_geography == "Global") %>% - filter(.data$year %in% c(.env$start_year, .env$start_year + .env$year_span)) - -if (nrow(techexposure_data) > 0) { - techexposure_data <- - techexposure_data %>% - mutate(green = .data$technology %in% .env$green_techs) %>% - group_by(.data$asset_class, .data$equity_market, .data$portfolio_name, - .data$ald_sector, .data$scenario, .data$year) %>% - mutate(plan_alloc_wt_sec_prod = sum(.data$plan_alloc_wt_tech_prod), - scen_alloc_wt_sec_prod = sum(.data$scen_alloc_wt_tech_prod)) %>% - mutate(production_plan = if_else(.data$plan_alloc_wt_tech_prod > 0, .data$plan_alloc_wt_tech_prod / .data$plan_alloc_wt_sec_prod, 0), - scenario_plan = if_else(.data$scen_alloc_wt_tech_prod > 0, .data$scen_alloc_wt_tech_prod / .data$scen_alloc_wt_sec_prod, 0)) %>% - group_by(.data$asset_class, .data$equity_market, .data$portfolio_name, - .data$ald_sector, .data$scenario, .data$year, .data$green) %>% - mutate(green_sum_prod = sum(.data$production_plan), - green_sum_scenario = sum(.data$scenario_plan)) %>% - ungroup() %>% - select("asset_class", "investor_name", "portfolio_name", "scenario_source", - "scenario", "allocation", "equity_market", "year", "ald_sector", - "technology", "production_plan", "scenario_plan", "green", - "green_sum_prod", "green_sum_scenario") %>% - pivot_longer( - cols = -c("asset_class", "investor_name", "portfolio_name", "scenario_source", - "scenario", "allocation", "equity_market", "year", "ald_sector", - "technology", "green","green_sum_prod", "green_sum_scenario"), - names_to = "val_type", values_to = "value") %>% - mutate( - green_sum = if_else(.data$val_type == "production_plan", .data$green_sum_prod, .data$green_sum_scenario) - ) %>% - select(-c("green_sum_prod", "green_sum_scenario")) %>% - ungroup() %>% - mutate(this_portfolio = .data$portfolio_name == .env$portfolio_name, - val_type = if_else(.data$this_portfolio == TRUE, paste0(.data$val_type, "_portfolio"), paste0(.data$val_type, "_benchmark"))) %>% - mutate(equity_market = case_when( - .data$equity_market == "GlobalMarket" ~ "Global Market", - .data$equity_market == "DevelopedMarket" ~ "Developed Market", - .data$equity_market == "EmergingMarket" ~ "Emerging Market", - TRUE ~ .data$equity_market) - ) %>% - # no need for showing scenario mix for the benchmark - filter( - .data$val_type != "scenario_plan_benchmark" - ) %>% - mutate(val_type = case_when( - .data$val_type == "production_plan_portfolio" ~ "Portfolio", - .data$val_type == "scenario_plan_portfolio" ~ "Scenario", - .data$val_type == "production_plan_benchmark" ~ "Benchmark", - TRUE ~ .data$val_type) - ) %>% - arrange( - .data$asset_class, - factor(.data$equity_market, levels = c("Global Market", "Developed Market", "Emerging Market")), - desc(.data$this_portfolio), - factor(.data$val_type, levels = c("Portfolio", "Scenario", "Benchmark")), - .data$portfolio_name, - factor(.data$technology, levels = .env$all_tech_levels) - ) %>% - select("asset_class", "equity_market", "portfolio_name", "scenario", "scenario_source", - "this_portfolio", "val_type", "ald_sector", "technology", "value", - "green", "green_sum", "year") %>% - filter( - !(.data$year == .env$start_year & .data$val_type == "Scenario") - ) -} - -techexposure_data - } - -prep_exposure_stats <- function(audit_file, investor_name, portfolio_name, pacta_sectors) { - pacta_asset_classes <- c("Bonds", "Equity") - - audit_table <- pacta.portfolio.report:::prep_audit_table( - audit_file, - investor_name = investor_name, - portfolio_name = portfolio_name, - currency_exchange_value = currency_exchange_value - ) - - exposure_stats <- audit_file %>% - filter( - .data$investor_name == .env$investor_name & - .data$portfolio_name == .env$portfolio_name) %>% - filter(.data$asset_type %in% pacta_asset_classes) %>% - filter(.data$valid_input == TRUE) %>% - mutate(across(c("bics_sector", "financial_sector"), as.character)) %>% - mutate( - sector = - if_else(!.data$financial_sector %in% .env$pacta_sectors, - "Other", - .data$financial_sector - ) - ) %>% - summarise( - value = sum(.data$value_usd, na.rm = TRUE) / .env$currency_exchange_value, - .by = c("asset_type", "sector") - ) %>% - mutate( - perc_asset_val_sector = .data$value / sum(.data$value, na.rm = TRUE), - .by = c("asset_type") - ) %>% - inner_join(audit_table, by = join_by(asset_type == asset_type_analysis)) %>% - select("asset_type", "percentage_value_invested", "sector", "perc_asset_val_sector") - - asset_classes_in_portfolio <- intersect(pacta_asset_classes, unique(exposure_stats$asset_type)) - - all_stats_with_zero_sector_exposure <- expand.grid( - asset_type = asset_classes_in_portfolio, - sector = pacta_sectors, - val_sector = 0 - ) %>% inner_join( - distinct(select(exposure_stats, c("asset_type", "percentage_value_invested"))), - by = join_by(asset_type) - ) - - exposure_stats_all <- all_stats_with_zero_sector_exposure %>% - left_join(exposure_stats, by = join_by(asset_type, sector, percentage_value_invested)) %>% - mutate( - perc_asset_val_sector = if_else( - is.na(.data$perc_asset_val_sector), - .data$val_sector, - .data$perc_asset_val_sector - ) - ) %>% - mutate( - asset_type = case_when( - .data$asset_type == "Bonds" ~ "Corporate Bonds", - .data$asset_type == "Equity" ~ "Listed Equity" - ) - ) %>% - select("asset_type", "percentage_value_invested", "sector", "perc_asset_val_sector") - - exposure_stats_all -} - - -# prep_company_bubble ---------------------------------------------------------- -# based on pacta.portfolio.report:::prep_company_bubble, but does not filter to -# allocation == "portfolio_weight" nor by scenario and scenario source - -prep_company_bubble <- - function(equity_results_company, - bonds_results_company, - portfolio_name, - start_year, - green_techs) { - - equity_data <- - equity_results_company %>% - filter(.data$portfolio_name == .env$portfolio_name) %>% - filter(.data$ald_sector %in% c("Power", "Automotive")) %>% - filter(.data$equity_market == "GlobalMarket") %>% - filter(.data$scenario_geography == "Global") %>% - filter(.data$year %in% c(.env$start_year, .env$start_year + 5)) %>% - mutate( - plan_buildout = last(.data$plan_tech_prod, order_by = .data$year) - first(.data$plan_tech_prod, order_by = .data$year), - scen_buildout = last(.data$scen_tech_prod, order_by = .data$year) - first(.data$scen_tech_prod, order_by = .data$year), - .by = c("company_name", "technology", "scenario_source", "scenario", "allocation") - ) %>% - filter(.data$year == .env$start_year) %>% - mutate(green = .data$technology %in% .env$green_techs) %>% - reframe( - plan_tech_share = sum(.data$plan_tech_share, na.rm = TRUE), - plan_buildout = sum(.data$plan_buildout, na.rm = TRUE), - scen_buildout = sum(.data$scen_buildout, na.rm = TRUE), - plan_carsten = sum(.data$plan_carsten, na.rm = TRUE), - port_weight = unique(.data$port_weight), - .by = c("company_name", "allocation", "scenario_source", - "scenario", "ald_sector", "green", "year") - ) %>% - mutate(y = .data$plan_buildout / .data$scen_buildout) %>% - filter(.data$green) %>% - select(-"plan_buildout", -"scen_buildout", -"green") %>% - filter(!is.na(.data$plan_tech_share)) %>% - mutate(y = pmax(.data$y, 0, na.rm = TRUE)) %>% - mutate(asset_class = "Listed Equity") - - bonds_data <- - bonds_results_company %>% - filter(.data$portfolio_name == .env$portfolio_name) %>% - filter(.data$ald_sector %in% c("Power", "Automotive")) %>% - filter(.data$equity_market == "GlobalMarket") %>% - filter(.data$scenario_geography == "Global") %>% - filter(.data$year %in% c(.env$start_year, .env$start_year + 5)) %>% - mutate( - plan_buildout = last(.data$plan_tech_prod, order_by = .data$year) - first(.data$plan_tech_prod, order_by = .data$year), - scen_buildout = last(.data$scen_tech_prod, order_by = .data$year) - first(.data$scen_tech_prod, order_by = .data$year), - .by = c("company_name", "technology", "scenario_source", "scenario", "allocation") - ) %>% - filter(.data$year == .env$start_year) %>% - mutate(green = .data$technology %in% .env$green_techs) %>% - reframe( - plan_tech_share = sum(.data$plan_tech_share, na.rm = TRUE), - plan_buildout = sum(.data$plan_buildout, na.rm = TRUE), - scen_buildout = sum(.data$scen_buildout, na.rm = TRUE), - plan_carsten = sum(.data$plan_carsten, na.rm = TRUE), - port_weight = unique(.data$port_weight), - .by = c("company_name", "allocation", "scenario_source", - "scenario", "ald_sector", "green", "year") - ) %>% - mutate(y = .data$plan_buildout / .data$scen_buildout) %>% - filter(.data$green) %>% - select(-"plan_buildout", -"scen_buildout", -"green") %>% - filter(!is.na(.data$plan_tech_share)) %>% - mutate(y = pmax(.data$y, 0, na.rm = TRUE)) %>% - mutate(asset_class = "Corporate Bonds") - - bind_rows(equity_data, bonds_data) - } - - -# prep_key_bars_company -------------------------------------------------------- -# based on pacta.portfolio.report:::prep_key_bars_company, but does not filter -# to allocation == "portfolio_weight" nor by scenario and scenario source - -prep_key_bars_company <- - function(equity_results_company, - bonds_results_company, - portfolio_name, - start_year, - pacta_sectors_not_analysed, - all_tech_levels) { - - equity_data_company <- - equity_results_company %>% - filter(.data$portfolio_name == .env$portfolio_name) %>% - filter(.data$year %in% c(.env$start_year + 5)) %>% - filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% - filter(.data$scenario_geography == "Global") %>% - filter(.data$ald_sector %in% c("Power", "Automotive")) %>% - select(-"id") %>% - rename(id = "company_name") %>% - select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", - "allocation", "scenario_source", "scenario", "year") %>% - arrange(desc(.data$port_weight)) %>% - mutate(asset_class = "Listed Equity") %>% - mutate_at("id", as.character) %>% # convert the col type to character to prevent errors in case empty df is binded by rows - group_by(.data$ald_sector, .data$technology) %>% # select at most 15 companies with the highest weigths per sector+technology - arrange(dplyr::desc(.data$port_weight), .by_group = TRUE) %>% - slice(1:15) %>% - filter(!is.null(.data$port_weight)) %>% - filter(!is.null(.data$plan_tech_share)) - - bonds_data_company <- - bonds_results_company %>% - filter(.data$portfolio_name == .env$portfolio_name) %>% - filter(.data$year %in% c(.env$start_year + 5)) %>% - filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% - filter(.data$scenario_geography == "Global") %>% - filter(.data$ald_sector %in% c("Power", "Automotive")) %>% - select(-"id") %>% - rename(id = "company_name") %>% - select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", - "allocation", "scenario_source", "scenario", "year") %>% - group_by(.data$id, .data$ald_sector, .data$technology) %>% - mutate(port_weight = sum(.data$port_weight, na.rm = TRUE)) %>% - group_by(.data$id, .data$technology) %>% - filter(row_number() == 1) %>% - filter(!.data$ald_sector %in% .env$pacta_sectors_not_analysed | !grepl("Aligned", .data$id)) %>% - arrange(desc(.data$port_weight)) %>% - mutate(asset_class = "Corporate Bonds") %>% - mutate_at("id", as.character) %>% # convert the col type to character to prevent errors in case empty df is bound by rows - group_by(.data$ald_sector, .data$technology) %>% # select at most 15 companies with the highest weigths per sector+technology - arrange(.data$port_weight, .by_group = TRUE) %>% - slice(1:15) %>% - group_by(.data$ald_sector) %>% - arrange(factor(.data$technology, levels = .env$all_tech_levels)) %>% - arrange(dplyr::desc(.data$port_weight), .by_group = TRUE) %>% - filter(!is.null(.data$port_weight)) %>% - filter(!is.null(.data$plan_tech_share)) - - bind_rows(equity_data_company, bonds_data_company) - } - - -# prep_key_bars_portfolio ------------------------------------------------------ -# based on pacta.portfolio.report:::prep_key_bars_portfolio, but does not filter -# to allocation == "portfolio_weight" nor by scenario and scenario source - -prep_key_bars_portfolio <- - function(equity_results_portfolio, - bonds_results_portfolio, - portfolio_name, - start_year, - pacta_sectors_not_analysed, - all_tech_levels) { - equity_data_portfolio <- - equity_results_portfolio %>% - filter(.data$portfolio_name == .env$portfolio_name) %>% - filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% - filter(.data$year %in% c(.env$start_year + 5)) %>% - filter(.data$ald_sector %in% c("Power", "Automotive")) %>% - filter(.data$scenario_geography == "Global") %>% - mutate(port_weight = 1) %>% - select("ald_sector", "technology", "plan_tech_share", "scen_tech_share", - "port_weight", "scenario", "scenario_source", "allocation", "year") %>% - pivot_longer(c("plan_tech_share", "scen_tech_share"), names_to = "plan") %>% - mutate(id = if_else(.data$plan == "plan_tech_share", "Portfolio", "Aligned* Portfolio")) %>% - rename(plan_tech_share = "value") %>% - select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", - "scenario", "scenario_source", "allocation", "year") %>% - filter(!.data$ald_sector %in% .env$pacta_sectors_not_analysed | !grepl("Aligned", .data$id)) %>% - mutate(asset_class = "Listed Equity") %>% - mutate_at("id", as.character) # convert the col type to character to prevent errors in case empty df is bound by rows - - bonds_data_portfolio <- - bonds_results_portfolio %>% - filter(.data$portfolio_name == .env$portfolio_name) %>% - filter(.data$equity_market %in% c("Global", "GlobalMarket")) %>% - filter(.data$year %in% c(.env$start_year + 5)) %>% - filter(.data$ald_sector %in% c("Power", "Automotive")) %>% - filter(.data$scenario_geography == "Global") %>% - mutate(port_weight = 1) %>% - select("ald_sector", "technology", "plan_tech_share", "scen_tech_share", - "port_weight", "scenario", "scenario_source", "allocation", "year") %>% - pivot_longer(c("plan_tech_share", "scen_tech_share"), names_to = "plan") %>% - mutate(id = if_else(.data$plan == "plan_tech_share", "Portfolio", "Aligned* Portfolio")) %>% - rename(plan_tech_share = "value") %>% - select("id", "ald_sector", "technology", "plan_tech_share", "port_weight", - "scenario", "scenario_source", "allocation", "year") %>% - mutate(asset_class = "Corporate Bonds") %>% - mutate_at("id", as.character) %>% - arrange(factor(.data$technology, levels = .env$all_tech_levels)) - - bind_rows(equity_data_portfolio, bonds_data_portfolio) - } - - -# input and output directories ------------------------------------------------- - -input_dir <- "./inputs" -output_dir <- "./outputs" -data_dir <- "./data" - - -# portfolio/user parameters ---------------------------------------------------- - -investor_name <- "investor_name" -portfolio_name <- "portfolio_name" -peer_group <- "peer_group" -language_select <- "EN" - -currency_exchange_value <- 1 -display_currency <- "USD" - -select_scenario_other <- "WEO2023_NZE_2050" -select_scenario <- "WEO2023_NZE_2050" - -green_techs <- c("RenewablesCap", "HydroCap", "NuclearCap", "Hybrid", "Electric", "FuelCell", "Hybrid_HDV", "Electric_HDV", "FuelCell_HDV","Electric Arc Furnace") -tech_roadmap_sectors <- c("Automotive", "Power", "Oil&Gas", "Coal") -pacta_sectors_not_analysed <- c("Steel", "Aviation", "Cement") - -power_tech_levels = c("RenewablesCap", "HydroCap", "NuclearCap", "GasCap", "OilCap", "CoalCap") -oil_gas_levels = c("Oil", "Gas") -coal_levels = c("Coal") -auto_levels = c("Electric", "Electric_HDV", "FuelCell","FuelCell_HDV", "Hybrid","Hybrid_HDV", "ICE", "ICE_HDV") -cement_levels = c("Integrated facility", "Grinding") -steel_levels = c("Electric Arc Furnace", "Open Hearth Furnace", "Basic Oxygen Furnace") -aviation_levels = c("Freight", "Passenger", "Mix", "Other") -all_tech_levels = c(power_tech_levels, auto_levels, oil_gas_levels, coal_levels, cement_levels, steel_levels, aviation_levels) - - -# config parameters from manifest ---------------------------------------------- - -manifest <- jsonlite::read_json(path = file.path(input_dir, "manifest.json")) - -start_year <- manifest$params$analysis$startYear -year_span <- manifest$params$analysis$timeHorizon -pacta_sectors <- unlist(manifest$params$analysis$sectorList) -equity_market_levels <- unlist(manifest$params$analysis$equityMarketList) -scen_geo_levels <- unlist(manifest$params$analysis$scenarioGeographiesList) - - -# load results from input directory -------------------------------------------- - -audit_file <- readRDS(file.path(input_dir, "audit_file.rds")) -emissions <- readRDS(file.path(input_dir, "emissions.rds")) -equity_results_portfolio <- readRDS(file.path(input_dir, "Equity_results_portfolio.rds")) -bonds_results_portfolio <- readRDS(file.path(input_dir, "Bonds_results_portfolio.rds")) -equity_results_company <- readRDS(file.path(input_dir, "Equity_results_company.rds")) -bonds_results_company <- readRDS(file.path(input_dir, "Bonds_results_company.rds")) - - -# data from PACTA inputs used to generate the results -------------------------- - -indices_bonds_results_portfolio <- readRDS(file.path(data_dir, "Indices_bonds_results_portfolio.rds")) -indices_equity_results_portfolio <- readRDS(file.path(data_dir, "Indices_equity_results_portfolio.rds")) -peers_bonds_results_portfolio <- pacta.portfolio.utils::empty_portfolio_results() -peers_equity_results_portfolio <- pacta.portfolio.utils::empty_portfolio_results() - - -# translations ----------------------------------------------------------------- - -dataframe_translations <- readr::read_csv( - system.file("extdata/translation/dataframe_labels.csv", package = "pacta.portfolio.report"), - col_types = readr::cols() -) - -header_dictionary <- readr::read_csv( - system.file("extdata/translation/dataframe_headers.csv", package = "pacta.portfolio.report"), - col_types = readr::cols() -) - -js_translations <- jsonlite::fromJSON( - txt = system.file("extdata/translation/js_labels.json", package = "pacta.portfolio.report") -) - -sector_order <- readr::read_csv( - system.file("extdata/sector_order/sector_order.csv", package = "pacta.portfolio.report"), - col_types = readr::cols() -) - -dictionary <- - pacta.portfolio.report:::choose_dictionary_language( - data = dataframe_translations, - language = language_select - ) - -header_dictionary <- pacta.portfolio.report:::replace_contents(header_dictionary, display_currency) - - -# add investor_name and portfolio_name to results data frames because ---------- -# pacta.portfolio.report functions expect that --------------------------------- - -audit_file <- - audit_file %>% - mutate( - investor_name = investor_name, - portfolio_name = portfolio_name - ) - -emissions <- - emissions %>% - mutate( - investor_name = investor_name, - portfolio_name = portfolio_name - ) - -equity_results_portfolio <- - equity_results_portfolio %>% - mutate( - investor_name = investor_name, - portfolio_name = portfolio_name - ) - -bonds_results_portfolio <- - bonds_results_portfolio %>% - mutate( - investor_name = investor_name, - portfolio_name = portfolio_name - ) - -equity_results_company <- - equity_results_company %>% - mutate( - investor_name = investor_name, - portfolio_name = portfolio_name - ) - -bonds_results_company <- - bonds_results_company %>% - mutate( - investor_name = investor_name, - portfolio_name = portfolio_name - ) - - -# data_included_table.json ----------------------------------------------------- - -audit_file %>% - pacta.portfolio.report:::prep_audit_table( - investor_name = investor_name, - portfolio_name = portfolio_name, - currency_exchange_value = currency_exchange_value - ) %>% - pacta.portfolio.report:::translate_df_contents("data_included_table", dictionary, inplace = TRUE) %>% - pacta.portfolio.report:::translate_df_headers("data_included_table", language_select, header_dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_included_table.json")) - - -# data_value_pie_bonds.json ---------------------------------------------------- - -audit_file %>% - pacta.portfolio.report:::prep_exposure_pie( - asset_type = "Bonds", - investor_name = investor_name, - portfolio_name = portfolio_name, - pacta_sectors = pacta_sectors, - currency_exchange_value = currency_exchange_value - ) %>% - pacta.portfolio.report:::translate_df_contents("data_value_pie_bonds", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_value_pie_bonds.json")) - - -# data_emissions_equity.json --------------------------------------------------- - -emissions %>% - pacta.portfolio.report:::prep_emissions_pie( - asset_type = "Equity", - investor_name = investor_name, - portfolio_name = portfolio_name, - pacta_sectors = pacta_sectors - ) %>% - pacta.portfolio.report:::translate_df_contents("data_emissions_pie_equity", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_emissions_pie_equity.json")) - - -# data_emissions_bonds.json ---------------------------------------------------- - -emissions %>% - pacta.portfolio.report:::prep_emissions_pie( - asset_type = "Bonds", - investor_name = investor_name, - portfolio_name = portfolio_name, - pacta_sectors = pacta_sectors - ) %>% - pacta.portfolio.report:::translate_df_contents("data_emissions_pie_bonds", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_emissions_pie_bonds.json")) - - -# data_value_pie_equity.json --------------------------------------------------- - -audit_file %>% - pacta.portfolio.report:::prep_exposure_pie( - asset_type = "Equity", - investor_name = investor_name, - portfolio_name = portfolio_name, - pacta_sectors = pacta_sectors, - currency_exchange_value = currency_exchange_value - ) %>% - pacta.portfolio.report:::translate_df_contents("data_value_pie_equity", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_value_pie_equity.json")) - - -# data_techmix.json ------------------------------------------------------------ - -pacta.portfolio.report:::prep_techexposure( - equity_results_portfolio = equity_results_portfolio, - bonds_results_portfolio = bonds_results_portfolio, - investor_name = investor_name, - portfolio_name = portfolio_name, - indices_equity_results_portfolio = indices_equity_results_portfolio, - indices_bonds_results_portfolio = indices_bonds_results_portfolio, - peers_equity_results_portfolio = peers_equity_results_portfolio, - peers_bonds_results_portfolio = peers_bonds_results_portfolio, - peer_group = peer_group, - select_scenario_other = select_scenario_other, - select_scenario = select_scenario, - start_year = start_year, - green_techs = green_techs, - equity_market_levels = equity_market_levels, - all_tech_levels = all_tech_levels - ) %>% - pacta.portfolio.report:::translate_df_contents("techexposure_data", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_techexposure.json")) - - -# data_techmix_sector.json ----------------------------------------------------- - -prep_techmix_sector( - equity_results_portfolio, - bonds_results_portfolio, - indices_equity_results_portfolio, - indices_bonds_results_portfolio, - peers_equity_results_portfolio, - peers_bonds_results_portfolio, - investor_name, - portfolio_name, - start_year, - year_span, - peer_group, - green_techs, - all_tech_levels - ) %>% - jsonlite::write_json(path = file.path(output_dir, "data_techmix_sector.json")) - -# data_trajectory_alignment.json ----------------------------------------------- - -pacta.portfolio.report:::prep_trajectory_alignment( - equity_results_portfolio = equity_results_portfolio, - bonds_results_portfolio = bonds_results_portfolio, - peers_equity_results_portfolio = peers_equity_results_portfolio, - peers_bonds_results_portfolio = peers_bonds_results_portfolio, - indices_equity_results_portfolio = indices_equity_results_portfolio, - indices_bonds_results_portfolio = indices_bonds_results_portfolio, - investor_name = investor_name, - portfolio_name = portfolio_name, - tech_roadmap_sectors = tech_roadmap_sectors, - peer_group = peer_group, - start_year = start_year, - year_span = year_span, - scen_geo_levels = scen_geo_levels, - all_tech_levels = all_tech_levels - ) %>% - pacta.portfolio.report:::translate_df_contents("data_trajectory_alignment", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_trajectory_alignment.json")) - - -# data_emissions.json ---------------------------------------------------------- - -pacta.portfolio.report:::prep_emissions_trajectory( - equity_results_portfolio = equity_results_portfolio, - bonds_results_portfolio = bonds_results_portfolio, - investor_name = investor_name, - portfolio_name = portfolio_name, - select_scenario_other = select_scenario_other, - select_scenario = select_scenario, - pacta_sectors = pacta_sectors, - year_span = year_span, - start_year = start_year - ) %>% - pacta.portfolio.report:::translate_df_contents("data_emissions", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_emissions.json")) - -# data_exposure_stats.json - -prep_exposure_stats( - audit_file = audit_file, - investor_name = investor_name, - portfolio_name = portfolio_name, - pacta_sectors = pacta_sectors - ) %>% - jsonlite::write_json(path = file.path(output_dir, "data_exposure_stats.json")) - - -# data_company_bubble.json ----------------------------------------------------- - -prep_company_bubble( - equity_results_company = equity_results_company, - bonds_results_company = bonds_results_company, - portfolio_name = portfolio_name, - start_year = start_year, - green_techs = green_techs - ) %>% - pacta.portfolio.report:::translate_df_contents("data_company_bubble", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_company_bubble.json")) - - -# data_techexposure_company_companies.json ------------------------------------- - -prep_key_bars_company( - equity_results_company = equity_results_company, - bonds_results_company = bonds_results_company, - portfolio_name = portfolio_name, - start_year = start_year, - pacta_sectors_not_analysed = pacta_sectors_not_analysed, - all_tech_levels = all_tech_levels - ) %>% - pacta.portfolio.report:::translate_df_contents("data_key_bars_company", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_techexposure_company_companies.json")) - - -# data_techexposure_company_portfolio.json ------------------------------------- - -prep_key_bars_portfolio( - equity_results_portfolio = equity_results_portfolio, - bonds_results_portfolio = bonds_results_portfolio, - portfolio_name = portfolio_name, - start_year = start_year, - pacta_sectors_not_analysed = pacta_sectors_not_analysed, - all_tech_levels = all_tech_levels - ) %>% - pacta.portfolio.report:::translate_df_contents("data_key_bars_portfolio", dictionary) %>% - jsonlite::write_json(path = file.path(output_dir, "data_techexposure_company_portfolio.json")) diff --git a/man/workflow.pacta.dashboard-package.Rd b/man/workflow.pacta.dashboard-package.Rd new file mode 100644 index 0000000..6fdaa78 --- /dev/null +++ b/man/workflow.pacta.dashboard-package.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/workflow.pacta.dashboard-package.R +\docType{package} +\name{workflow.pacta.dashboard-package} +\alias{workflow.pacta.dashboard} +\alias{workflow.pacta.dashboard-package} +\title{workflow.pacta.dashboard: Run PACTA dashboard JSON generation} +\description{ +Run PACTA dashboard JSON generation. +} +\author{ +\strong{Maintainer}: Alex Axthelm \email{aaxthelm@rmi.org} (\href{https://orcid.org/0000-0001-8579-8565}{ORCID}) [contractor] + +Authors: +\itemize{ + \item CJ Yetman \email{cj@cjyetman.com} (\href{https://orcid.org/0000-0001-5099-9500}{ORCID}) [contractor] + \item Jackson Hoffart \email{jackson.hoffart@gmail.com} (\href{https://orcid.org/0000-0002-8600-5042}{ORCID}) [contractor] +} + +Other contributors: +\itemize{ + \item RMI \email{PACTA4investors@rmi.org} [copyright holder, funder] +} + +} +\keyword{internal}