get_timeseries: Get time series

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/getSeries.R

Description

Get timeseries data from Water Data online

Usage

1
2
3
4
5
6
7
8
9
get_timeseries(
  parameter_type,
  station_number,
  start_date,
  end_date,
  tz,
  return_fields,
  ts_name
)

Arguments

parameter_type

The water data parameter type (e.g. Water Course Discharge). See parameters() for a full list.

station_number

The AWRC station number.

start_date

Start date formatted as a string or date class (YYYY-MM-DD).

end_date

End date formatted as a string or date class (YYYY-MM-DD).

tz

Optional: the desired time zone for the output timeseries. Input must be an Olson Name (see OlsonNames()). By default the the timeseries is returned in an offset timezone (e.g. Etc/GMT-10 for NSW) as the timeseries do not observe DST.

return_fields

Optional: columns to be returned from Water Data Online. By default Timestamp, Value and Quality Code are returned.

ts_name

The timeseries name (e.g. DMQaQc.Merged.DailyMean.24HR) that is desired.

Details

This function can be used if you want to retrieve a specific timeseries that is not the default quality checked one.

Common valid return fields are:

Other valid return fields (depending on the parameter requested) may be:

If the request is not valid it will fail.

Value

A tibble with columns with the requested return_fields. A zero row tibble is returned if no data is returned from the query. The columns of the tibble are returned as character classes and have not been formatted to more appropriate correct classes (this happens in other functions).

Author(s)

Alexander Buzacott

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Accessible dam storage, as shown on the BoM Water Storage dashboard
## Not run: 
get_timeseries(
  parameter_type = "Storage Volume",
  "G8150011",
  "2020-01-01",
  "2020-01-31",
  ts_name = "PR02AVQaQc.Merged.DailyMean.24HR",
  tz = NULL,
  return_fields = c("Timestamp", "Value", "Quality Code")
)

## End(Not run)
# See the linked SOS2 manual in See Also to find more timeseries names

bomWater documentation built on Sept. 16, 2020, 9:07 a.m.