get_daily: Get quality-checked timeseries data

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

View source: R/getSeries.R

Description

This function returns a quality-checked timeseries from Water Data Online.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_daily(
  parameter_type,
  station_number,
  start_date,
  end_date,
  var,
  aggregation,
  tz,
  return_fields
)

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).

var

The daily variable of interest. Valid inputs are 'mean', 'min', 'max' for continuous series such as discharge and 'total' for discrete series such as rainfall and evaporation.

aggregation

Whether the data is to be aggregated midnight to midnight ('24HR') or from 9am-9am ('09HR'). The default is '24HR'. '09HR' is only available for mean discharge and total rainfall and evaporation.

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.

Details

For the parameters (and their units) that can be requested, see parameters. More information can be found in the Water Data Online SOS manual (URL in See Also below).

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 the requested return fields, which by default are Timestamp, Value and Quality Code. Zero row tibbles are returned if no data is available for the requested dates. The aggregation of data is generally the mean for most variables, except for rainfall and evaporation which is the sum over the chosen period.

Author(s)

Alexander Buzacott

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Download daily mean aggregated over the standard day
## Not run: 
get_daily(
  parameter_type = "Water Course Discharge",
  station_number = "410730",
  start_date = "2020-01-01",
  end_date = "2020-01-31",
  var = "mean",
  aggregation = "24HR"
)
## End(Not run)

# Download daily mean aggregated between 9am to 9am
## Not run: 
get_daily(
  parameter_type = "Water Course Discharge",
  station_number = "410730",
  start_date = "2020-01-01",
  end_date = "2020-01-31",
  var = "mean",
  aggregation = "09HR"
)
## End(Not run)

# Download the daily max over the standard day
## Not run: 
get_daily(
  parameter_type = "Water Course Discharge",
  station_number = "410730",
  start_date = "2020-01-01",
  end_date = "2020-01-31",
  var = "max",
  aggregation = "24HR"
)
## End(Not run)

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