Create a final-to-useful allocation template
generate_fu_allocation_template.Rd
This function creates a blank final-to-useful allocation template on a per-country basis.
Usage
generate_fu_allocation_template(
country,
cache_path = PFUWorkflow::cache_info$cache_path,
data_target = PFUWorkflow::target_names$Specified,
fu_analysis_path_target = PFUWorkflow::target_names$fu_analysis_folder,
fu_allocation_template_file_name = paste0(country, " FU Allocations Template"),
ext = ".xlsx",
output_path = file.path(drake::readd(fu_analysis_path_target, character_only = TRUE,
path = cache_path), country) %>% dir_create_pipe(showWarnings = FALSE, recursive =
TRUE) %>% file.path(paste0(fu_allocation_template_file_name, ext)),
n_allocation_rows = 4,
overwrite = FALSE
)
Arguments
- country
A string, the 3-letter ISO code of the country for which a template is desired.
- cache_path
- data_target, fu_analysis_path_target
- fu_allocation_template_file_name
The file name for the template. Default is "
country
FU Allocations Template.ext
".- ext
The output file name extension. Default is ".xlsx" for an Excel file.
- output_path
The path of the output file to be created. Default uses arguments
country
,fu_analysis_path_target
,fu_allocation_template_file_name
, andext
to construct a path.- n_allocation_rows
The number of allocation rows per combination of sector and final energy carrier. Default is
4
.- overwrite
Tells whether to overwrite an existing file at
output+path
. Default isFALSE
.