Get DPIRD Summary Weather Data in the APSIM Format From the Weather 2.0 API
Source:R/get_dpird_apsim.R
get_dpird_apsim.Rd
Automates the retrieval and conversion of summary data from the DPIRD Weather 2.0 API to an APSIM .met file formatted weather data object.
Arguments
- station_code
A
character
string orfactor
fromget_stations_metadata()
of the BOM station code for the station of interest.- start_date
A
character
string orDate
object representing the beginning of the range to query in the format “yyyy-mm-dd” (ISO8601). Data returned is inclusive of this date.- end_date
A
character
string orDate
object representing the end of the range query in the format “yyyy-mm-dd” (ISO8601). Data returned is inclusive of this date. Defaults to the current system date.- 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
An apsimx object of class ‘met’ with attributes.
Saving objects
To save “met” objects the apsimx::write_apsim_met()
is reexported.
Note that when saving, comments from SILO will be included, but these will
not be printed as a part of the resulting met
object in your R session.
See also
Other DPIRD:
dpird_extreme_weather_values
,
dpird_minute_values
,
dpird_summary_values
,
find_nearby_stations()
,
find_stations_in()
,
get_dpird_availability()
,
get_dpird_extremes()
,
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_extremes()
,
get_dpird_minute()
,
get_dpird_summaries()
,
get_patched_point()
,
get_patched_point_apsim()
,
get_precis_forecast()
,
get_radar_imagery()
,
get_satellite_imagery()
Other APSIM:
get_data_drill_apsim()
,
get_patched_point_apsim()
,
reexports
Author
Adam H. Sparks, adamhsparks@gmail.com