Learn R Programming

bomWater (version 0.4.1)

get_station_list: Retrieve water observation stations

Description

get_station_list queries Water Data Online and returns station details. Queries can be input with the desired parameter_type to find all the stations on record. If you already have a vector of station numbers, you can pass the vector to station_number and return the details of those stations. return_fields can be customised to return various data about the stations.

Usage

get_station_list(parameter_type, station_number, return_fields)

Arguments

parameter_type

The parameter for the station request (e.g. Water Course Discharge, Storage Level)

station_number

Optional: a single or multiple vector of AWRC station numbers.

return_fields

Station details to be returned. By default the columns returned are station name, number, ID, latitude and longitude. Can be customised with a vector of parameters.

Value

With the default return fields, a tibble with columns station_name, station_no, station_id, station_latitude, station_longitude.

Details

Possible return fields for get_station_list() are:

  • station_name

  • station_longname

  • station_no

  • station_id

  • station_latitude

  • station_longitude

  • station_carteasting

  • station_cartnorthing

  • stationparameter_name

  • station_georefsystem

  • catchment_no

  • catchment_id

  • catchment_name

  • site_no

  • site_id

  • site_name

  • parametertype_id

  • parametertype_name

  • object_type

  • custom_attributes

Examples

Run this code
# NOT RUN {
# Get all Water Course Discharge Stations
# }
# NOT RUN {
get_station_list()
# }
# NOT RUN {
# Just the details for Cotter River at Gingera
# }
# NOT RUN {
get_station_list(station_number = "410730")
# }
# NOT RUN {
# Rainfall stations
# }
# NOT RUN {
get_station_list(parameter_type = "Rainfall")
# }
# NOT RUN {
# Vector of return_fields
return_fields <- c(
  "station_name",
  "station_longname",
  "station_no",
  "station_id",
  "station_latitude",
  "station_longitude",
  "station_carteasting",
  "station_cartnorthing",
  "stationparameter_name",
  "station_georefsystem",
  "catchment_no",
  "catchment_id",
  "catchment_name",
  "site_no",
  "site_id",
  "site_name",
  "parametertype_id",
  "parametertype_name",
  "object_type",
  "custom_attributes"
)
# Get all attributes for one station
# }
# NOT RUN {
get_station_list("Water Course Discharge", "410730", return_fields)
# }

Run the code above in your browser using DataLab