Fetch nicely formatted individual extreme weather summaries from the DPIRD Weather 2.0 API.
get_dpird_extremes(
station_code,
values = "all",
api_key = get_key(service = "DPIRD")
)
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.
A character
string or factor
from
get_stations_metadata()
of the BOM station code for the station
of interest.
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.
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.
all (which will return all of the following values),
erosionCondition,
erosionConditionLast7Days,
erosionConditionLast7DaysDays,
erosionConditionLast7DaysMinutes,
erosionConditionLast14Days,
erosionConditionLast14DaysDays,
erosionConditionLast14DaysMinutes,
erosionConditionMonthToDate,
erosionConditionMonthToDateDays,
erosionConditionMonthToDateMinutes,
erosionConditionMonthToDateStartTime,
erosionConditionSince12AM,
erosionConditionSince12AMMinutes,
erosionConditionSince12AMStartTime,
erosionConditionYearToDate,
erosionConditionYearToDateDays,
erosionConditionYearToDateMinutes,
erosionConditionYearToDateStartTime,
frostCondition,
frostConditionLast7Days,
frostConditionLast7DaysDays,
frostConditionLast7DaysMinutes,
frostConditionLast14Days,
frostConditionLast14DaysDays,
frostConditionLast14DaysMinutes,
frostConditionMonthToDate,
frostConditionMonthToDateDays,
frostConditionMonthToDateMinutes,
frostConditionMonthToDateStartTime,
frostConditionSince9AM,
frostConditionSince9AMMinutes,
frostConditionSince9AMStartTime,
frostConditionTo9AM,
frostConditionTo9AMMinutes,
frostConditionTo9AMStartTime,
frostConditionYearToDate,
frostConditionYearToDate,
frostConditionYearToDateMinutes,
frostConditionYearToDateStartTime,
heatCondition,
heatConditionLast7Days,
heatConditionLast7DaysDays,
heatConditionLast7DaysMinutes,
heatConditionLast14Days,
heatConditionLast14DaysDays,
heatConditionLast14DaysMinutes,
heatConditionMonthToDate,
heatConditionMonthToDateDays,
heatConditionMonthToDateMinutes,
heatConditionMonthToDateStartTime,
heatConditionSince12AM,
heatConditionSince12AMMinutes,
heatConditionSince12AMStartTime,
heatConditionYearToDate,
heatConditionYearToDateDays,
heatConditionYearToDateMinutes, and
heatConditionYearToDateStartTime
Rodrigo Pires, rodrigo.pires@dpird.wa.gov.au, and Adam Sparks, adamhsparks@gmail.com
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()
if (FALSE) {
# 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"
)
}
Run the code above in your browser using DataLab