View source: R/path_functions.R
| get_abs_paths | R Documentation |
Default argument values assume a directory structure that includes Dropbox and is appropriate for the Fellowship project for Dr. Paul Brockway.
get_abs_paths(
home_path = as.character(fs::path_home()),
cloud_storage_path = "OneDrive - University of Leeds",
project_path = file.path(cloud_storage_path,
"Fellowship 1960-2015 PFU database research"),
iea_year = "2022",
iea_folder_path = file.path(project_path, "IEA extended energy balance data",
paste("IEA", iea_year, "energy balance data")),
iea_data_path = file.path(iea_folder_path, paste("IEA Extended Energy Balances",
iea_year, "(TJ).csv")),
version = "v1.2",
input_data_path = file.path(project_path, "InputData", version),
output_data_path = file.path(project_path, "OutputData"),
schema_path = file.path(input_data_path, "SchemaAndSimpleTables.xlsx"),
fao_data_path = file.path(input_data_path, "fao_qcl_data.rds"),
ilo_employment_data_path = file.path(input_data_path, "ilo_employment_data.rds"),
ilo_working_hours_data_path = file.path(input_data_path, "ilo_working_hours_data.rds"),
hmw_analysis_data_path = file.path(input_data_path, "hmw_analysis_data.xlsx"),
amw_analysis_data_path = file.path(input_data_path, "amw_analysis_data.xlsx"),
mw_concordance_path = file.path(input_data_path, "FAO_ISO_MW_Mapping.xlsx"),
country_concordance_path = file.path(input_data_path, "Country_Concordance_Full.xlsx"),
aggregation_mapping_path = file.path(input_data_path, "aggregation_mapping.xlsx"),
phi_constants_path = file.path(input_data_path, "phi_constants.xlsx"),
exemplar_table_path = file.path(input_data_path, "Exemplar_Table.xlsx"),
fu_analysis_folder = file.path(input_data_path, "FU analysis data"),
machine_data_folder = file.path(input_data_path, "Machines - Data"),
ceda_data_folder = file.path(input_data_path, "CEDA Data"),
exiobase_energy_flows_path = file.path(input_data_path,
"exiobase_energy_flows_concordance.xlsx"),
reports_source_folders = "reports",
reports_dest_folder = file.path(output_data_path, "Reports"),
pipeline_caches_folder = file.path(output_data_path, "PipelineCaches"),
pipeline_releases_folder = file.path(output_data_path, "PipelineReleases"),
versions_and_products_path = file.path(pipeline_releases_folder,
"versions and products.xlsx"),
fsep = .Platform$file.sep
)
home_path |
The absolute path to the user's home directory. |
cloud_storage_path |
The path to the user's cloud storage directory, relative to |
project_path |
The path to the project directory, relative to |
iea_year |
The year of IEA data release, as a string. |
iea_folder_path |
The path to the IEA data directory, relative to |
iea_data_path |
The path to the IEA data file, relative to |
version |
The version of the input data. |
input_data_path |
The path to the input data directory, relative to |
output_data_path |
The path to the output data directory, relative to |
schema_path |
The path to the database schema file relative to |
fao_data_path |
The path to the FAO live animals data file, relative to |
ilo_employment_data_path |
The path to the ILO employment data file, relative to |
ilo_working_hours_data_path |
The path to the ILO working hours data file, relative to |
hmw_analysis_data_path |
The path to the human muscle work analysis file, relative to |
amw_analysis_data_path |
The path to the animal muscle work file, relative to |
mw_concordance_path |
The path to the muscle work country concordance file, relative to |
country_concordance_path |
The path to the country concordance file, relative to |
aggregation_mapping_path |
The path to the aggregation mapping file, relative to |
phi_constants_path |
The path to the exergy-to-energy ratio file containing constant values, relative to |
exemplar_table_path |
The path to the exemplar table, relative to |
fu_analysis_folder |
The path to the folder containing final-to-useful exergy information, relative to |
machine_data_folder |
The path to the folder containing machine-specific efficiencies, relative to |
ceda_data_folder |
The path to the folder containing CEDA (Centre for Environmental Data Analysis) data, relative to |
exiobase_energy_flows_path |
The path to exiobase energy flows. |
reports_source_folders |
A string vector of paths to folders containing report sources. |
reports_dest_folder |
The path to the folder into which reports will be written, relative to |
pipeline_caches_folder |
The path to a folder containing zipped versions of the pipeline cache, relative to |
pipeline_releases_folder |
The path to a folder containing released versions of the PSUT target data frame, relative to |
versions_and_products_path |
The path to the versions and products file containing lists of all versions and products,
relative to |
fsep |
The file separator used when constructing paths.
Default is |
The default argument for home_path gets the value for fs::path_home().
Although this function is called get_abs_paths(),
it can return relative paths if both home_path and cloud_storage_path
are set to "" (an empty string) and
project_path is set to the root folder of the project.
In that event, the leading file separator (fsep) is removed
from the path (if it exists).
Output items include:
The absolute path to the user's home.
The absolute path of the user's cloud storage folder.
The absolute path to the project folder.
The absolute path to a folder containing IEA data.
The absolute path to the IEA data file for the OECD countries.
The absolute path to the input data directory.
The absolute path to the output data directory.
The absolute path to a Excel schema file.
The absolute path to the FAO live animals data file.
The absolute path to the ILO employment data file.
The absolute path to the ILO working hours data file.
The absolute path to the human muscle work analysis file.
The absolute path to the animal muscle work file.
The absolute path to the muscle work country concordance file.
The absolute path to the country concordance file.
The absolute path to the aggregation mapping file.
The absolute path to the exergy-to-energy ratio file containing constant values.
The path to the exemplar table.
The absolute path to the folder containing final-to-useful exergy information.
The absolute path to the folder containing machine-specific efficiency information.
The absolute path to the folder containing CEDA environment information.
The absolute path to the folder containing Exiobase energy flows information.
A vector of absolute paths to folders containing source reports.
A directory into which completed reports will be written.
The path to a folder that stores zipped versions of the pipeline cache.
The path to a folder that stores releases of various targets.
The path to the versions and products file.
A named list containing paths to important directories and files. See details for output items.
get_abs_paths()
# Set relative paths with empty strings
get_abs_paths(home_path = "", cloud_storage_path = "",
project_path = "my_project_path")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.