Extract/Calculate Temporal Interval
gs_temporal_interval.Rd
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.
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.
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