Skip to contents

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 or an object of class <SubTreeFileSystem> created using functions arrow::s3_bucket() or arrow::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 the arrow package.

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's round_id property of config_tasks. Otherwise should match round's round_id value 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. If round_id is NULL or the round does not have a round level file_format setting, returns the hub level file_format setting.

  • get_hub_derived_task_ids: character vector of hub or round level derived task ID names. If round_id is NULL or the round does not have a round level derived_tasks_ids setting, returns the hub level derived_tasks_ids setting.

Functions

  • get_hub_timezone(): Get the hub timezone

  • get_hub_model_output_dir(): Get the model output directory name

  • get_hub_file_formats(): Get the hub or round level file formats

  • get_hub_derived_task_ids(): Get the hub or round level derived_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"