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)
get_hub_derived_task_ids(hub_path, round_id = NULL)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. Ignored if hub contains only a single round.
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_tasks_idssetting, returns the hub levelderived_tasks_idssetting.
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_tasks_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"
