RMI-PACTA / pacta.portfolio.allocate

https://rmi-pacta.github.io/pacta.portfolio.allocate/
Other
1 stars 0 forks source link

Consider moving map-related processing to `pacta.portfolio.report` #47

Open AlexAxthelm opened 1 month ago

AlexAxthelm commented 1 month ago

Given that the has_map parameter is TRUE when an analysis is run for preparing a report, and FALSE otherwise, it makes sense that we could remove this parameter entirely, and move the relevant sections of the code to be part of the report generation process, rather than requiring it to be specified prior to knowing the end-use-case for an analysis.

The data dependencies seem pretty minimal (total weighted portfolio and the ABCD files from pacta-data).

Currently the has_map parameter controls flow in workflow.pacta:

https://github.com/RMI-PACTA/workflow.pacta/blob/c3376bef6c1f6ecfe17fbbe02eb40f5620a5a66b/R/calc_weights_and_outputs.R#L88-L109

https://github.com/RMI-PACTA/workflow.pacta/blob/c3376bef6c1f6ecfe17fbbe02eb40f5620a5a66b/R/calc_weights_and_outputs.R#L153-L163

cc @cjyetman @jdhoffa

cjyetman commented 1 month ago

I guess this would have to be implemented in pacta.portfolio.report first before considering removing it from here.