parse_ag_bulletin {weatherOz} | R Documentation |
Parse local BOM agriculture bulletin XML file(s) for a specified state or territory or all Australia. Ported from bomrang.
parse_ag_bulletin(state, filepath)
state |
Required value of an Australian state or territory as full name
or postal code. Fuzzy string matching via |
filepath |
A string providing the directory location of the précis file(s) to parse. See Details for more. |
Allowed state and territory postal codes, only one state per request
or all using AUS
.
Australia, returns forecast for all states, NT and ACT
Australian Capital Territory (will return NSW)
New South Wales
Northern Territory
Queensland
South Australia
Tasmania
Victoria
Western Australia
The filepath argument will only accept a directory where files
are located for parsing. DO NOT supply the full path including the file
name. This function will only parse the requested state or all of
Australia in the same fashion as get_precis_forecast()
, provided that the
files are all present in the directory.
A data.table::data.table()
of Australia BOM agricultural
bulletin information.
Adam H. Sparks, adamhsparks@gmail.com, and Paul Melloy, paul@melloy.com.au
Agricultural observations are retrieved from the Australian Bureau of
Meteorology (BOM) Weather Data Services Agriculture Bulletins,
http://www.bom.gov.au/catalogue/observations/about-agricultural.shtml.
and
Australian Bureau of Meteorology (BOM)) Weather Data Services
Observation of Rainfall,
http://www.bom.gov.au/climate/how/observations/rain-measure.shtml.
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.
Other BOM:
find_forecast_towns()
,
get_ag_bulletin()
,
get_available_imagery()
,
get_available_radar()
,
get_coastal_forecast()
,
get_precis_forecast()
,
get_radar_imagery()
,
get_satellite_imagery()
,
parse_coastal_forecast()
,
parse_precis_forecast()
Other parse:
parse_coastal_forecast()
,
parse_precis_forecast()
# parse the ag bulletin for Western Australia
# download to tempfile() using basename() to keep original name
utils::download.file(url = "ftp://ftp.bom.gov.au/anon/gen/fwo/IDQ60604.xml",
destfile = file.path(tempdir(),
basename("ftp://ftp.bom.gov.au/anon/gen/fwo/IDQ60604.xml")),
mode = "wb")
parse_ag_bulletin(state = "QLD", filepath = tempdir())