Skip to content

Commit

Permalink
adapt to new function signatures in pacta.portfolio.allocate (#316)
Browse files Browse the repository at this point in the history
Adapting to
RMI-PACTA/pacta.portfolio.allocate#49

Depends on and incorporates changes needed for
RMI-PACTA/pacta.portfolio.allocate#49

CLoses #317
  • Loading branch information
AlexAxthelm committed May 30, 2024
1 parent 033729a commit 26473e5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Imports:
jsonlite,
knitr,
pacta.executive.summary,
pacta.portfolio.allocate,
pacta.portfolio.allocate,
pacta.portfolio.audit,
pacta.portfolio.import,
pacta.portfolio.report,
Expand All @@ -48,7 +48,7 @@ Imports:
shiny
Remotes:
RMI-PACTA/pacta.executive.summary,
RMI-PACTA/pacta.portfolio.allocate,
RMI-PACTA/pacta.portfolio.allocate,
RMI-PACTA/pacta.portfolio.audit,
RMI-PACTA/pacta.portfolio.import,
RMI-PACTA/pacta.portfolio.report,
Expand Down
28 changes: 24 additions & 4 deletions web_tool_script_2.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,18 @@ if (inherits(port_raw_all_eq, "data.frame") && nrow(port_raw_all_eq) > 0) {
port_all_eq <- bind_rows(port_pw_eq, port_own_eq)

if (has_map) {
abcd_raw_eq <- get_abcd_raw("Equity")
map_eq <- merge_in_geography(company_all_eq, abcd_raw_eq)
abcd_raw_eq <- get_abcd_raw(
portfolio_type = "Equity",
analysis_inputs_path = analysis_inputs_path,
start_year = start_year,
time_horizon = time_horizon,
sector_list = sector_list
)
map_eq <- merge_in_geography(
portfolio = company_all_eq,
ald_raw = abcd_raw_eq,
sector_list = sector_list
)
rm(abcd_raw_eq)

map_eq <- aggregate_map_data(map_eq)
Expand Down Expand Up @@ -188,8 +198,18 @@ if (inherits(port_raw_all_cb, "data.frame") && nrow(port_raw_all_cb) > 0) {

if (has_map) {
if (data_check(company_all_cb)) {
abcd_raw_cb <- get_abcd_raw("Bonds")
map_cb <- merge_in_geography(company_all_cb, abcd_raw_cb)
abcd_raw_cb <- get_abcd_raw(
portfolio_type = "Bonds",
analysis_inputs_path = analysis_inputs_path,
start_year = start_year,
time_horizon = time_horizon,
sector_list = sector_list
)
map_cb <- merge_in_geography(
portfolio = company_all_cb,
ald_raw = abcd_raw_cb,
sector_list = sector_list
)
rm(abcd_raw_cb)

map_cb <- aggregate_map_data(map_cb)
Expand Down

0 comments on commit 26473e5

Please sign in to comment.