get_dpird_extremes {weatherOz}R Documentation

Get DPIRD Extreme Weather Event Summaries

Description

Fetch nicely formatted individual extreme weather summaries from the DPIRD Weather 2.0 API.

Usage

get_dpird_extremes(
  station_code,
  values = "all",
  api_key = get_key(service = "DPIRD")
)

Arguments

station_code

A character string or factor from get_stations_metadata() of the BOM station code for the station of interest.

values

A character string with the type of extreme weather to return. See Available Values for a full list of valid values. Defaults to all, returning the full list of values unless otherwise specified.

api_key

A character string containing your API key from DPIRD, https://www.agric.wa.gov.au/web-apis, for the DPIRD Weather 2.0 API. Defaults to automatically detecting your key from your local .Renviron, .Rprofile or similar. Alternatively, you may directly provide your key as a string here. If nothing is provided, you will be prompted on how to set up your R session so that it is auto-detected.

Value

a data.table::data.table() of one row with station_code, station_name, latitude, longitude, date_time of the query and the extreme weather information according to the value(s) selected.

Available Values

Author(s)

Rodrigo Pires, rodrigo.pires@dpird.wa.gov.au, and Adam Sparks, adamhsparks@gmail.com

See Also

Other DPIRD: dpird_extreme_weather_values, dpird_minute_values, dpird_summary_values, find_nearby_stations(), find_stations_in(), get_dpird_apsim(), get_dpird_availability(), get_dpird_minute(), get_dpird_summaries(), get_stations_metadata()

Other data fetching: get_ag_bulletin(), get_coastal_forecast(), get_data_drill(), get_data_drill_apsim(), get_dpird_apsim(), get_dpird_minute(), get_dpird_summaries(), get_patched_point(), get_patched_point_apsim(), get_precis_forecast(), get_radar_imagery(), get_satellite_imagery()

Examples

## Not run: 
# Query Bonnie Rock station for wind erosion and heat extreme events
# Note that you need to supply your own API key

xtreme <- get_dpird_extremes(
  station_code = "BR",
  values = c("erosionCondition",
           "heatCondition"),
  api_key = "your_api_key"
)

## End(Not run)


[Package weatherOz version 1.0.0 Index]