Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

add timestamp specific GENERAL configs #287

Merged
merged 6 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions parameter_files/ProjectParameters_GENERAL_2019Q4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
default:

reporting:
project_report_name: general
display_currency: USD
currency_exchange_value: 1

parameters:
horizon_year: 5
select_scenario: WEO2019_SDS
scenario_auto: ETP2017_B2DS
scenario_other: ETP2017_B2DS
scenario_shipping: ETP2017_B2DS
portfolio_allocation_method: portfolio_weight
scenario_geography: Global

methodology:
has_map: yes
has_sb: no
has_revenue: no
has_credit: no
inc_emissionfactors: yes
inc_stresstest: yes

sectors:
tech_roadmap_sectors:
- Power
- Automotive
- Oil&Gas
- Coal
pacta_sectors_not_analysed:
- Steel
- Aviation
- Cement
green_techs:
- RenewablesCap
- HydroCap
- NuclearCap
- Hybrid
- Electric
- FuelCell
- Hybrid_HDV
- Electric_HDV
- FuelCell_HDV
- Dc-Electric Arc Furnace
- Ac-Electric Arc Furnace
alignment_techs:
- RenewablesCap
- CoalCap
- Coal
- Oil
- Gas
- Electric
- ICE

stress_test:
shock_year: 2030
price_data_version: 2021Q1

asset_types:
- Equity
- Bonds
- Others
- Funds

scenario_sources_list:
- ETP2017
- WEO2019
- WEO2020
- GECO2019
- IPR2021

scenario_geography_list:
- Global
- GlobalAggregate
- NonOECD
- OECD

equity_market_list:
- GlobalMarket
- DevelopedMarket
- EmergingMarket

grouping_variables:
- investor_name
- portfolio_name
86 changes: 86 additions & 0 deletions parameter_files/ProjectParameters_GENERAL_2020Q4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
default:

reporting:
project_report_name: general
display_currency: USD
currency_exchange_value: 1

parameters:
horizon_year: 5
select_scenario: WEO2019_SDS
scenario_auto: ETP2017_B2DS
scenario_other: ETP2017_B2DS
scenario_shipping: ETP2017_B2DS
portfolio_allocation_method: portfolio_weight
scenario_geography: Global

methodology:
has_map: yes
has_sb: no
has_revenue: no
has_credit: no
inc_emissionfactors: yes
inc_stresstest: yes

sectors:
tech_roadmap_sectors:
- Power
- Automotive
- Oil&Gas
- Coal
pacta_sectors_not_analysed:
- Steel
- Aviation
- Cement
green_techs:
- RenewablesCap
- HydroCap
- NuclearCap
- Hybrid
- Electric
- FuelCell
- Hybrid_HDV
- Electric_HDV
- FuelCell_HDV
- Dc-Electric Arc Furnace
- Ac-Electric Arc Furnace
alignment_techs:
- RenewablesCap
- CoalCap
- Coal
- Oil
- Gas
- Electric
- ICE

stress_test:
shock_year: 2030
price_data_version: 2021Q1

asset_types:
- Equity
- Bonds
- Others
- Funds

scenario_sources_list:
- ETP2017
- WEO2019
- WEO2020
- GECO2019
- IPR2021

scenario_geography_list:
- Global
- GlobalAggregate
- NonOECD
- OECD

equity_market_list:
- GlobalMarket
- DevelopedMarket
- EmergingMarket

grouping_variables:
- investor_name
- portfolio_name
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
default:

paths:
data_location_ext: ../pacta-data/2021Q4/

reporting:
project_report_name: general
display_currency: USD
currency_exchange_value: 1

parameters:
timestamp: 2022Q4
dataprep_timestamp: 2022Q4
start_year: 2022
timestamp: 2021Q4
dataprep_timestamp: 2021Q4
start_year: 2021
horizon_year: 5
select_scenario: WEO2022_NZE_2050
scenario_other: GECO2022_1.5C
select_scenario: WEO2021_NZE_2050
scenario_other: GECO2021_1.5C-Unif
portfolio_allocation_method: portfolio_weight
scenario_geography: Global

Expand Down Expand Up @@ -55,10 +58,11 @@ default:
- Funds

scenario_sources_list:
- GECO2022
- IPR2021
- ETP2020
- WEO2021
- GECO2021
- ISF2021
- WEO2022
- IPR2021

scenario_geography_list:
- Global
Expand All @@ -70,3 +74,7 @@ default:
- GlobalMarket
- DevelopedMarket
- EmergingMarket

grouping_variables:
- investor_name
- portfolio_name
58 changes: 58 additions & 0 deletions parameter_files/ProjectParameters_GENERAL_2022Q4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
default:

paths:
data_location_ext: ../pacta-data/2022Q4/

reporting:
project_report_name: general
display_currency: USD
currency_exchange_value: 1

parameters:
start_year: 2022
horizon_year: 5
select_scenario: WEO2022_NZE_2050
scenario_other: GECO2022_1.5C
portfolio_allocation_method: portfolio_weight
scenario_geography: Global

methodology:
has_map: TRUE
has_revenue: FALSE
has_credit: FALSE
inc_emissionfactors: TRUE

sectors:
tech_roadmap_sectors:
- Power
- Automotive
- Oil&Gas
- Coal
pacta_sectors_not_analysed:
- Steel
- Aviation
- Cement
green_techs:
- RenewablesCap
- HydroCap
- NuclearCap
- Hybrid
- Electric
- FuelCell
- Electric Arc Furnace

scenario_sources_list:
- GECO2022
- ISF2021
- WEO2022

scenario_geography_list:
- Global
- GlobalAggregate
- NonOECD
- OECD

equity_market_list:
- GlobalMarket
- DevelopedMarket
- EmergingMarket
58 changes: 58 additions & 0 deletions parameter_files/ProjectParameters_GENERAL_2023Q4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
default:

paths:
data_location_ext: ../pacta-data/2023Q4/

reporting:
project_report_name: general
display_currency: USD
currency_exchange_value: 1

parameters:
start_year: 2023
horizon_year: 5
select_scenario: WEO2023_NZE_2050
scenario_other: WEO2023_NZE_2050
portfolio_allocation_method: portfolio_weight
scenario_geography: Global

methodology:
has_map: TRUE
has_revenue: FALSE
has_credit: FALSE
inc_emissionfactors: TRUE

sectors:
tech_roadmap_sectors:
- Power
- Automotive
- Oil&Gas
- Coal
pacta_sectors_not_analysed:
- Steel
- Aviation
- Cement
green_techs:
- RenewablesCap
- HydroCap
- NuclearCap
- Hybrid
- Electric
- FuelCell
- Electric Arc Furnace

scenario_sources_list:
- GECO2023
- ISF2023
- WEO2023

scenario_geography_list:
- Global
- GlobalAggregate
- NonOECD
- OECD

equity_market_list:
- GlobalMarket
- DevelopedMarket
- EmergingMarket
8 changes: 7 additions & 1 deletion web_tool_script_1.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ set_webtool_paths(portfolio_root_dir)

set_portfolio_parameters(file_path = file.path(par_file_path, paste0(portfolio_name_ref_all, "_PortfolioParameters.yml")))

set_project_parameters(file.path(working_location, "parameter_files", paste0("ProjectParameters_", project_code, ".yml")))
proj_param_filename <- ifelse(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
proj_param_filename <- ifelse(
proj_param_filename <- dplyr::if_else(

project_code == "GENERAL",
paste0("ProjectParameters_", project_code, "_", port_holdings_date, ".yml"),
proj_param_filename <- paste0("ProjectParameters_", project_code, ".yml")
)
project_config_path <- file.path(working_location, "parameter_files", proj_param_filename)
set_project_parameters(project_config_path)

# need to define an alternative location for data files
analysis_inputs_path <- set_analysis_inputs_path(data_location_ext)
Expand Down
8 changes: 7 additions & 1 deletion web_tool_script_2.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ set_webtool_paths(portfolio_root_dir)

set_portfolio_parameters(file_path = file.path(par_file_path, paste0(portfolio_name_ref_all, "_PortfolioParameters.yml")))

set_project_parameters(file.path(working_location, "parameter_files", paste0("ProjectParameters_", project_code, ".yml")))
proj_param_filename <- ifelse(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
proj_param_filename <- ifelse(
proj_param_filename <- dplyr::if_else(

project_code == "GENERAL",
paste0("ProjectParameters_", project_code, "_", port_holdings_date, ".yml"),
proj_param_filename <- paste0("ProjectParameters_", project_code, ".yml")
)
project_config_path <- file.path(working_location, "parameter_files", proj_param_filename)
set_project_parameters(project_config_path)

# need to define an alternative location for data files
analysis_inputs_path <- set_analysis_inputs_path(data_location_ext)
Expand Down
10 changes: 8 additions & 2 deletions web_tool_script_3.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ set_webtool_paths(portfolio_root_dir)

set_portfolio_parameters(file_path = file.path(par_file_path, paste0(portfolio_name_ref_all, "_PortfolioParameters.yml")))

set_project_parameters(file.path(working_location, "parameter_files", paste0("ProjectParameters_", project_code, ".yml")))
proj_param_filename <- ifelse(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
proj_param_filename <- ifelse(
proj_param_filename <- dplyr::if_else(

project_code == "GENERAL",
paste0("ProjectParameters_", project_code, "_", port_holdings_date, ".yml"),
proj_param_filename <- paste0("ProjectParameters_", project_code, ".yml")
)
project_config_path <- file.path(working_location, "parameter_files", proj_param_filename)
set_project_parameters(project_config_path)

analysis_inputs_path <- set_analysis_inputs_path(data_location_ext)

Expand Down Expand Up @@ -183,7 +189,7 @@ sector_order <- readr::read_csv(

# combine config files to send to create_interactive_report()
portfolio_config_path <- file.path(par_file_path, paste0(portfolio_name_ref_all, "_PortfolioParameters.yml"))
project_config_path <- file.path(working_location, "parameter_files", paste0("ProjectParameters_", project_code, ".yml"))

pacta_data_public_manifest <-
list(
creation_time_date = jsonlite::read_json(file.path(analysis_inputs_path, "manifest.json"))$creation_time_date,
Expand Down
Loading