get_dpird_summaries {weatherOz} | R Documentation |
Get DPIRD Weather Data in Summarised Formats
Description
Fetch nicely formatted individual station weather summaries from the DPIRD Weather 2.0 API.
Usage
get_dpird_summaries(
station_code,
start_date,
end_date = Sys.Date(),
interval = c("daily", "15min", "30min", "hourly", "monthly", "yearly"),
values = "all",
api_key = get_key(service = "DPIRD")
)
Arguments
station_code |
A |
start_date |
A |
end_date |
A |
interval |
A |
values |
A |
api_key |
A |
Value
a data.table::data.table()
with station_code
and the date
interval queried together with the requested weather variables in
alphabetical order. The first ten columns will always be:
-
station_code
, -
station_name
, -
longitude
, -
latitude
, -
year
, -
month
, -
day
, -
hour
, -
minute
, and ifmonth
or finer is present, -
date
(a combination of year, month, day, hour, minute as appropriate).
Start Dates
The earliest available data start from August of 2000 for Vasse, “VA”.
Column Name Details
Column names are converted from the default returns of the API to
be snake_case formatted and where appropriate, the names of the values
that are analogous between SILO and DPIRD data are
named using the same name for ease of interoperability, e.g., using
rbind()
to create a data.table
that contains data from both APIs.
However, use with caution and don't mix datasets of different time-steps,
i.e., this function gets many summary values not just “daily”
time-step data. The functions that access the SILO
API only provide access to daily data, so don't mix (sub)hourly,
monthly or yearly data from DPIRD with SILO.
Available Values
all (which will return all of the following values),
airTemperature,
airTemperatureAvg,
airTemperatureMax,
airTemperatureMaxTime,
airTemperatureMin,
airTemperatureMinTime,
apparentAirTemperature,
apparentAirTemperatureAvg,
apparentAirTemperatureMax,
apparentAirTemperatureMaxTime,
apparentAirTemperatureMin,
apparentAirTemperatureMinTime,
barometricPressure,
barometricPressureAvg,
barometricPressureMax,
barometricPressureMaxTime,
barometricPressureMin,
barometricPressureMinTime,
battery,
batteryMinVoltage,
batteryMinVoltageDateTime,
chillHours,
deltaT,
deltaTAvg,
deltaTMax,
deltaTMaxTime,
deltaTMin,
deltaTMinTime,
dewPoint,
dewPointAvg,
dewPointMax,
dewPointMaxTime,
dewPointMin,
dewPointMinTime,
erosionCondition,
erosionConditionMinutes,
erosionConditionStartTime,
errors,
etoShortCrop,
etoTallCrop,
evapotranspiration,
evapotranspirationShortCrop,
evapotranspirationTallCrop,
frostCondition,
frostConditionMinutes,
frostConditionStartTime,
heatCondition,
heatConditionMinutes,
heatConditionStartTime,
observations,
observationsCount,
observationsPercentage,
panEvaporation,
panEvaporation12AM,
rainfall,
relativeHumidity,
relativeHumidityAvg,
relativeHumidityMax,
relativeHumidityMaxTime,
relativeHumidityMin,
relativeHumidityMinTime,
richardsonUnits,
soilTemperature,
soilTemperatureAvg,
soilTemperatureMax,
soilTemperatureMaxTime,
soilTemperatureMin,
soilTemperatureMinTime,
solarExposure,
wetBulb,
wetBulbAvg,
wetBulbMax,
wetBulbMaxTime,
wetBulbMin,
wetBulbMinTime,
wind,
windAvgSpeed, and
windMaxSpeed
Note
Please note this function converts date-time columns from Coordinated Universal Time ‘UTC’ to Australian Western Standard Time ‘AWST’.
Author(s)
Adam H. Sparks, adamhsparks@gmail.com, and Rodrigo Pires, rodrigo.pires@dpird.wa.gov.au
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_extremes()
,
get_dpird_minute()
,
get_stations_metadata()
Other data fetching:
get_ag_bulletin()
,
get_coastal_forecast()
,
get_data_drill()
,
get_data_drill_apsim()
,
get_dpird_apsim()
,
get_dpird_extremes()
,
get_dpird_minute()
,
get_patched_point()
,
get_patched_point_apsim()
,
get_precis_forecast()
,
get_radar_imagery()
,
get_satellite_imagery()
Examples
## Not run:
# Note that you need to supply your own API key
# Use default for end date (current system date) to get rainfall
wd <- get_dpird_summaries(
station_code = "CL001",
start_date = "20171028",
api_key = "your_api_key",
interval = "yearly",
values = "rainfall"
)
# Only for wind and erosion conditions for daily time interval
wd <- get_dpird_summaries(
station_code = "BI",
start_date = "20220501",
end_date = "20220502",
api_key = "your_api_key",
interval = "daily",
values = c(
"wind",
"erosionCondition",
"erosionConditionMinutes",
"erosionConditionStartTime"
)
)
## End(Not run)