ki_timeseries_values function

Get values for time series id or list of time series ids.

Get values for time series id or list of time series ids.

Returns time series values for given time series id and date range.

ki_timeseries_values( hub, ts_id, start_date, end_date, return_fields, datasource = 0 )

Arguments

  • hub: The KiWIS database you are querying. Either one of the defaults or a URL. See README.
  • ts_id: Either: a single time series id or a vector of time series ids. Time series ids can be found using the ki_timeseries_list function.
  • start_date: A date string formatted "YYYY-MM-DD". Defaults to yesterday.
  • end_date: A date string formatted "YYYY-MM-DD". Defaults to today.
  • return_fields: (Optional) Specific fields to return. Consult your KiWIS hub services documentation for available options. Should be a comma separate string or a vector.
  • datasource: (Optional) The data source to be used, defaults to 0.

Returns

A tibble with following columns by default: Timestamp, Value, ts_name, Units, station_name

Examples

## Not run: ki_timeseries_values( hub = "swmc", ts_id = "1125831042", start_date = "2015-12-01", end_date = "2018-01-01" ) ## End(Not run)

Other functions in kiwisR

Related functions from the same R package

  • Maintainer: Ryan Whaley
  • License: MIT + file LICENSE
  • Last published: 2024-10-11