Download the latest station locations and metadata for stations in the SILO and DPIRD networks. For BOM stations that exist in SILO, but lack metadata from BOM, the rows will exist to indicate that the station is in the SILO data set, but there is no corresponding BOM metadata available.
get_stations_metadata(
station_code = NULL,
station_name = NULL,
which_api = "all",
api_key = NULL,
include_closed = FALSE,
rich = FALSE
)
A data.table::data.table()
of BOM weather stations'
metadata for stations available from SILO and weather stations'
metadata for stations available from DPIRD's Weather 2.0
API with the following columns sorted by state
and
station_name
.
station_code: | Unique station code. factor |
station_name: | Unique station name. character |
start: | Date observations start. date |
end: | Date observations end. date |
latitude: | Latitude in decimal degrees. numeric |
longitude: | Longitude in decimal degrees. numeric |
state: | State in which the station is located. character |
elev_m: | Station elevation in metres. numeric |
source: | Organisation responsible for the data or station
maintenance. character |
include_closed: | Station include_closed, one of ‘open’ or
‘closed’. character |
wmo: | World Meteorological Organisation, (WMO), number
if applicable. numeric |
rich values | |
capabilities: | a list of the station's capabilities (data that it
records). character |
probe_height: | temperature probe height in metres. double |
rain_gauge_height | rain gauge height in metres. double |
wind_probe_heights: | wind probe heights always 3 metres, although
some have 10 metre probes. integer |
An optional value that should be provided as a single
string
value or character vector
of station codes for which to return
metadata. If this or station_name
are not provided, all station metadata
is returned by default. If this and station_name
are both provided, this
takes precedence and values corresponding to this input will be returned.
An optional value that should be provided as either a
single string
or character vector
of station names for which to return
metadata. Fuzzy matching is used, e.g., using
c("brisbane", "melbourne")
will return rows for “Brisbane”,
“Brisbane Aero”, “Mt Brisbane”,
“City of Melbourne Bay”, “Selbourne Kirnbrae”,
“Maroondah Weir Melbourne Water”, “Melbourne Airport” and
“Melbourne Botanical Gardens” station_name
values. If this or
station_code
are not provided, all station metadata is returned by
default. Using station_code
will always override this argument if both
are provided.
A string
value that indicates which API to use.
Valid values are all
, for both SILO (BOM data) and
DPIRD APIs; silo
for only stations from the
SILO API (BOM data); or dpird
for stations
from the DPIRD Weather 2.0 API. Defaults to all
.
A character
string containing your API key from
DPIRD, https://www.agric.wa.gov.au/web-apis, for the
DPIRD Weather 2.0 API. If left as NULL
, 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. Only used when which_api is
DPIRD
or all
.
A Boolean
string indicating whether to include closed
stations' metadata. Use TRUE
to include these. Defaults to FALSE
.
A Boolean
string indicating whether to return rich information
about DPIRD's weather station(s), this does not affect the
SILO stations' metadata, the variables for these observations
will be NA
. Defaults to FALSE
.
Adam H. Sparks, adamhsparks@gmail.com
Station location and other metadata are sourced from the Australian Bureau of
Meteorology (BOM) webpage, Bureau of Meteorology Site Numbers:
http://www.bom.gov.au/climate/cdo/about/site-num.shtml and
http://www.bom.gov.au/climate/data/lists_by_element/stations.txt and the
DPIRD Weather 2.0 API.
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_dpird_summaries()
Other SILO:
find_nearby_stations()
,
find_stations_in()
,
get_data_drill()
,
get_data_drill_apsim()
,
get_patched_point()
,
get_patched_point_apsim()
,
silo_daily_values
Other metadata:
find_forecast_towns()
,
find_nearby_stations()
,
find_stations_in()
,
get_available_imagery()
,
get_available_radar()
,
get_dpird_availability()
if (FALSE) {
# fetch metadata for all stations available in {weatherOz}
get_stations_metadata(api_key = "your_api_key")
}
Run the code above in your browser using DataLab