Get hub configuration fields
Usage
get_hub_timezone(hub_path)
get_hub_model_output_dir(hub_path)
get_hub_file_formats(hub_path, round_id = NULL, call = rlang::current_env())
get_hub_derived_task_ids(
hub_path,
round_id = NULL,
call = rlang::current_env()
)Arguments
- hub_path
Either a character string path to a local Modeling Hub directory, a character string of a URL to a GitHub repository or an object of class
<SubTreeFileSystem>created using functionsarrow::s3_bucket()orarrow::gs_bucket()by providing a string S3 or GCS bucket name or path to a Modeling Hub directory stored in the cloud. For more details consult the Using cloud storage (S3, GCS) in thearrowpackage.- round_id
Character string. Round identifier. If the round is set to
round_id_from_variable: true, IDs are values of the task ID defined in the round'sround_idproperty ofconfig_tasks. Otherwise should match round'sround_idvalue in config.- call
The execution environment of the function to name in error and warning messages. By default, messages name this function. Supply another environment, such as a wrapper function's environment, to name that function instead.
Value
get_hub_timezone: The timezone of the hub
get_hub_model_output_dir: The model output directory name
get_hub_file_formats: character vector accepted hub or round level file formats. Ifround_idisNULLor the round does not have a round levelfile_formatsetting, returns the hub levelfile_formatsetting.
get_hub_derived_task_ids: character vector of hub or round level derived task ID names. Ifround_idisNULLor the round does not have a round levelderived_task_idssetting, returns the hub levelderived_task_idssetting. Seeget_derived_task_ids_config()to get the same from a tasks config object.
Functions
get_hub_timezone(): Get the hub timezoneget_hub_model_output_dir(): Get the model output directory nameget_hub_file_formats(): Get the hub or round level file formatsget_hub_derived_task_ids(): Get the hub or round levelderived_task_ids
Examples
hub_path <- system.file("testhubs", "flusight", package = "hubUtils")
get_hub_timezone(hub_path)
#> [1] "US/Eastern"
get_hub_model_output_dir(hub_path)
#> [1] "forecasts"
get_hub_file_formats(hub_path)
#> [1] "csv" "parquet" "arrow"
get_hub_file_formats(hub_path, "2022-12-12")
#> [1] "csv" "parquet" "arrow"
