Skip to contents

Helper function to extract and return the temporal interval (in seconds) for different data sets based on the resource_id identifier. Used to estimate the number of expected values to be retrieved as there is per-request limit.

Usage

gs_temporal_interval(resource_id)

Arguments

resource_id

character, name of the resource_id

Value

Returns an integer vector of the same length as the input vector resource_id with the temporal resolution of the data set in seconds or NA in case the string could not have been decoded.

Author

Reto Stauffer

Examples

gs_temporal_interval("test-1d-string")
#> Warning: not able to extract temporal interval from test-1d-string, returning NA.
#> [1] NA
ds <- gs_datasets()
gs_temporal_interval(ds$resource_id)
#> [1] 31622400    86400     3600  2678400      600      600      600     3600