From a50683f5fc143a595b62f6ba32be4fb12af27c30 Mon Sep 17 00:00:00 2001 From: CJ Yetman - RMI Date: Mon, 19 Aug 2024 13:44:42 +0200 Subject: [PATCH] formmatting fixes --- R/load_config.R | 67 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 11 deletions(-) diff --git a/R/load_config.R b/R/load_config.R index 5b6c155c..172e7e42 100644 --- a/R/load_config.R +++ b/R/load_config.R @@ -6,21 +6,27 @@ load_config <- function(config) { get_abcd_dir <- function(params) { params[["directories"]][["dir_abcd"]] } + get_abcd_filename <- function(params) { params[["file_names"]][["filename_abcd"]] } + get_abcd_sheet <- function(params) { params[["file_names"]][["sheet_abcd"]] } + get_matched_dir <- function(params) { params[["directories"]][["dir_matched"]] } + get_raw_dir <- function(params) { params[["directories"]][["dir_raw"]] } + get_scenario_dir <- function(params) { params[["directories"]][["dir_scenario"]] } + get_output_dir <- function(params) { params[["directories"]][["dir_output"]] } @@ -28,24 +34,31 @@ get_output_dir <- function(params) { get_scenario_tms_filename <- function(params) { params[["file_names"]][["filename_scenario_tms"]] } + get_scenario_sda_filename <- function(params) { params[["file_names"]][["filename_scenario_sda"]] } + get_start_year <- function(params) { params[["project_parameters"]][["start_year"]] } + get_time_frame <- function(params) { params[["project_parameters"]][["time_frame"]] } + get_remove_inactive_companies <- function(params) { params[["project_parameters"]][["remove_inactive_companies"]] } + get_scenario_source <- function(params) { params[["project_parameters"]][["scenario_source"]] } + get_scenario_select <- function(params) { params[["project_parameters"]][["scenario_select"]] } + get_region_select <- function(params) { params[["project_parameters"]][["region_select"]] } @@ -61,31 +74,62 @@ get_match_priority <- function(params) { get_match_by_sector <- function(params) { params[["matching"]][["params_match_name"]][["by_sector"]] } + get_match_min_score <- function(params) { params[["matching"]][["params_match_name"]][["min_score"]] } + get_match_method <- function(params) { params[["matching"]][["params_match_name"]][["method"]] } + get_match_p <- function(params) { params[["matching"]][["params_match_name"]][["p"]] } + get_match_overwrite <- function(params) { params[["matching"]][["params_match_name"]][["overwrite"]] } + get_match_join_id <- function(params) { params[["matching"]][["params_match_name"]][["join_id"]] } -get_match_plot_width <- function(params) params[["match_success_rate"]][["plot_width"]] -get_match_plot_height <- function(params) params[["match_success_rate"]][["plot_height"]] -get_match_plot_units <- function(params) params[["match_success_rate"]][["plot_units"]] -get_match_plot_resolution <- function(params) params[["match_success_rate"]][["plot_resolution"]] -get_apply_sector_split <- function(params) params[["sector_split"]][["apply_sector_split"]] -get_sector_split_type <- function(params) params[["sector_split"]][["sector_split_type"]] -get_use_maunal_sector_classification <- function(params) params[["matching"]][["own_sector_classification"]][["use_own_sector_classification"]] -get_manual_sector_classification_dir <- function(params) params[["matching"]][["own_sector_classification"]][["dir_own_sector_classification"]] -get_manual_sector_classification_filename <- function(params) params[["matching"]][["own_sector_classification"]][["filename_own_sector_classification"]] +get_match_plot_width <- function(params) { + params[["match_success_rate"]][["plot_width"]] +} + +get_match_plot_height <- function(params) { + params[["match_success_rate"]][["plot_height"]] +} + +get_match_plot_units <- function(params) { + params[["match_success_rate"]][["plot_units"]] +} + +get_match_plot_resolution <- function(params) { + params[["match_success_rate"]][["plot_resolution"]] +} + +get_apply_sector_split <- function(params) { + params[["sector_split"]][["apply_sector_split"]] +} + +get_sector_split_type <- function(params) { + params[["sector_split"]][["sector_split_type"]] +} + +get_use_maunal_sector_classification <- function(params) { + params[["matching"]][["own_sector_classification"]][["use_own_sector_classification"]] +} + +get_manual_sector_classification_dir <- function(params) { + params[["matching"]][["own_sector_classification"]][["dir_own_sector_classification"]] +} + +get_manual_sector_classification_filename <- function(params) { + params[["matching"]][["own_sector_classification"]][["filename_own_sector_classification"]] +} get_manual_sector_classification_path <- function(params) { file.path( @@ -115,7 +159,9 @@ get_advanced_company_indicators_path <- function(config) { ) } -get_advanced_company_indicators_sheet <- function(config) config[["sector_split"]][["sheet_advanced_company_indicators"]] +get_advanced_company_indicators_sheet <- function(config) { + config[["sector_split"]][["sheet_advanced_company_indicators"]] +} get_scenario_tms_path <- function(config) { file.path( @@ -124,7 +170,6 @@ get_scenario_tms_path <- function(config) { ) } - get_scenario_sda_path <- function(config) { file.path( get_scenario_dir(config),