Learn R Programming

kiwisR (version 0.2.4)

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

Description

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

Usage

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

Value

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

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.

Examples

Run this code
if (FALSE) {
ki_timeseries_values(
  hub = "swmc",
  ts_id = "1125831042",
  start_date = "2015-12-01",
  end_date = "2018-01-01"
)
}

Run the code above in your browser using DataLab