Learn R Programming

bomWater (version 0.4.1)

get_yearly: Get quality-checked timeseries data

Description

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

Usage

get_yearly(
  parameter_type,
  station_number,
  start_date,
  end_date,
  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 YYYY-MM-DD) or just the year (YYYY)

end_date

End date (formatted as YYYY-MM-DD) or just the year (YYYY)

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.

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.

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:

  • Timestamp

  • Value

  • Quality Code

  • Interpolation Type

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

  • Absolute Value

  • AV Interpolation

  • AV Quality Code

  • Runoff Value

  • RV Interpolation

  • RV Quality Code

  • Aggregation

  • Accuracy

If the request is not valid it will fail.

See Also

Examples

Run this code
# NOT RUN {
# Download annual rainfall for Cotter Hut
# }
# NOT RUN {
get_yearly(
  parameter_type = "Rainfall",
  station_number = "570946",
  start_date = 2016,
  end_date = 2020
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab