Parse local BOM agriculture bulletin XML file(s) and return a data frame for a specified state or territory or all Australia.

parse_ag_bulletin(state, filepath)

Arguments

state

Required value of an Australian state or territory as full name or postal code. Fuzzy string matching via agrep is done.

filepath

A string providing the directory location of the précis file(s) to parse. See Details for more.

Value

A data.table of Australia BOM agricultural bulletin information. For full details of fields and units returned see Appendix 3 in the bomrang vignette, use
vignette("bomrang", package = "bomrang") to view.

Details

Allowed state and territory postal codes, only one state per request or all using AUS.

ACT

Australian Capital Territory (will return NSW)

NSW

New South Wales

NT

Northern Territory

QLD

Queensland

SA

South Australia

TAS

Tasmania

VIC

Victoria

WA

Western Australia

AUS

Australia, returns forecast for all states, NT and ACT

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.

References

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

See also

Author

Adam H. Sparks, [email protected] and Paul Melloy [email protected]

Examples

# \donttest{ # parse the ag bulletin for Queensland # download to tempfile() using basename() to keep original name 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") BOM_bulletin <- parse_ag_bulletin(state = "QLD", filepath = tempdir()) BOM_bulletin
#> product_id state dist name wmo site #> 1: IDQ60604 QLD 27 WEIPA AERO 94170 27045 #> 2: IDQ60604 QLD 29 MOUNT ISA AERO 94332 29127 #> 3: IDQ60604 QLD 30 GEORGETOWN AIRPORT 94274 30124 #> 4: IDQ60604 QLD 31 CAIRNS AERO 94287 31011 #> 5: IDQ60604 QLD 31 WALKAMIN RESEARCH STATION 95284 31108 #> 6: IDQ60604 QLD 31 MAREEBA AIRPORT 95286 31210 #> 7: IDQ60604 QLD 32 SOUTH JOHNSTONE EXP STN 95292 32037 #> 8: IDQ60604 QLD 32 TOWNSVILLE AERO 94294 32040 #> 9: IDQ60604 QLD 33 AYR DPI RESEARCH STN 95295 33002 #> 10: IDQ60604 QLD 33 COLLINSVILLE POST OFFICE 94360 33013 #> 11: IDQ60604 QLD 33 MACKAY M.O 94367 33119 #> 12: IDQ60604 QLD 35 TAMBO POST OFFICE 94355 35069 #> 13: IDQ60604 QLD 35 EMERALD AIRPORT 94363 35264 #> 14: IDQ60604 QLD 36 LONGREACH AERO 94346 36031 #> 15: IDQ60604 QLD 38 BOULIA AIRPORT 94333 38003 #> 16: IDQ60604 QLD 38 BIRDSVILLE AIRPORT 95482 38026 #> 17: IDQ60604 QLD 39 ROCKHAMPTON AERO 94374 39083 #> 18: IDQ60604 QLD 39 THANGOOL AIRPORT 94376 39089 #> 19: IDQ60604 QLD 39 BUNDABERG AERO 94387 39128 #> 20: IDQ60604 QLD 40 UNIVERSITY OF QUEENSLAND GATTON 94562 40082 #> 21: IDQ60604 QLD 40 BRISBANE AERO 94578 40842 #> 22: IDQ60604 QLD 40 LOGAN CITY WATER TREATMENT PLANT 95581 40854 #> 23: IDQ60604 QLD 41 OAKEY AERO 94552 41359 #> 24: IDQ60604 QLD 41 DALBY AIRPORT 94542 41522 #> 25: IDQ60604 QLD 41 WARWICK 94555 41525 #> 26: IDQ60604 QLD 43 MITCHELL POST OFFICE 94514 43020 #> 27: IDQ60604 QLD 43 ROMA AIRPORT 94515 43091 #> 28: IDQ60604 QLD 43 ST GEORGE AIRPORT 94517 43109 #> 29: IDQ60604 QLD 44 CHARLEVILLE AERO 94510 44021 #> 30: IDQ60604 QLD 45 THARGOMINDAH AIRPORT 95492 45025 #> product_id state dist name wmo site #> station obs_time_local obs_time_utc time_zone #> 1: Weipa 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 2: Mount Isa 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 3: Georgetown Airport 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 4: Cairns 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 5: Walkamin 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 6: Mareeba 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 7: South Johnstone 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 8: Townsville 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 9: Ayr 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 10: Collinsville 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 11: Mackay 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 12: Tambo 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 13: Emerald 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 14: Longreach 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 15: Boulia 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 16: Birdsville 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 17: Rockhampton 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 18: Thangool 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 19: Bundaberg 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 20: Gatton 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 21: Brisbane Airport 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 22: Logan City 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 23: Oakey 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 24: Dalby 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 25: Warwick 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 26: Mitchell 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 27: Roma 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 28: St George 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 29: Charleville 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> 30: Thargomindah Airport 2021-10-01 09:00:00 2021-09-30 23:00:00 EST #> station obs_time_local obs_time_utc time_zone #> lat lon elev bar_ht start end r tn tx twd ev tg sn #> 1: -12.6778 141.9208 18.0 18.6 1972 2021 0.0 19.8 37.1 5.4 NA NA NA #> 2: -20.6778 139.4875 340.3 341.0 1966 2021 0.0 20.3 38.5 13.2 NA NA NA #> 3: -18.3039 143.5306 301.8 302.5 2004 2021 2.4 21.6 35.7 2.6 NA NA NA #> 4: -16.8736 145.7458 2.2 2.6 1941 2021 0.2 18.8 27.2 5.6 NA NA NA #> 5: -17.1347 145.4281 594.0 NA 1965 2021 0.0 15.4 27.4 4.5 5.0 13.8 NA #> 6: -17.0704 145.4293 471.9 473.1 2000 2021 0.0 16.6 28.5 4.3 NA NA NA #> 7: -17.6053 145.9972 18.3 18.6 1920 2021 0.0 18.8 25.6 3.2 NA NA NA #> 8: -19.2483 146.7661 4.3 4.6 1940 2021 0.0 21.0 28.6 1.8 NA NA NA #> 9: -19.6169 147.3758 17.0 NA 1951 2021 0.0 19.0 28.0 NA NA NA NA #> 10: -20.5533 147.8464 196.0 NA 1939 2021 0.0 19.9 30.2 2.0 4.6 NA NA #> 11: -21.1172 149.2169 30.3 30.3 1959 2021 0.0 21.1 29.7 3.6 NA NA NA #> 12: -24.8819 146.2564 395.1 397.4 1877 2021 2.8 15.0 30.8 8.0 6.8 10.0 NA #> 13: -23.5694 148.1756 189.4 190.1 1981 2021 14.4 18.4 32.1 0.7 NA NA NA #> 14: -23.4397 144.2828 192.2 192.5 1949 2021 0.0 15.8 35.0 11.3 NA NA NA #> 15: -22.9117 139.9039 161.8 158.3 1886 2021 0.0 18.3 37.2 10.8 14.6 16.7 NA #> 16: -25.8975 139.3472 46.6 47.0 2000 2021 0.0 13.1 31.6 9.1 NA NA NA #> 17: -23.3753 150.4775 10.4 15.1 1939 2021 3.0 19.7 30.4 0.7 NA NA NA #> 18: -24.4935 150.5709 193.1 193.8 1929 2021 9.6 16.4 30.3 1.4 NA NA NA #> 19: -24.9069 152.3230 30.8 31.5 1942 2021 5.6 16.4 27.7 0.8 NA NA NA #> 20: -27.5436 152.3375 89.0 NA 1897 2021 10.8 14.0 27.0 NA NA NA NA #> 21: -27.3917 153.1292 4.5 9.5 1992 2021 3.0 15.4 25.1 1.8 NA 12.4 7 #> 22: -27.6839 153.1947 14.0 NA 1992 2021 17.4 15.8 26.5 2.6 NA NA NA #> 23: -27.4034 151.7413 405.7 407.1 1970 2021 4.0 14.0 24.8 3.4 NA NA NA #> 24: -27.1605 151.2634 343.9 344.4 1992 2021 5.0 14.8 24.4 3.6 NA NA NA #> 25: -28.2061 152.1003 475.4 475.8 1994 2021 1.4 10.7 20.8 3.3 NA NA NA #> 26: -26.4888 147.9777 336.5 338.0 1884 2021 0.6 13.6 30.2 6.3 NA 12.9 NA #> 27: -26.5477 148.7710 307.4 307.8 1985 2021 3.6 15.6 29.7 4.2 NA NA NA #> 28: -28.0478 148.5957 198.5 199.1 1997 2021 0.0 15.2 29.8 7.8 NA NA NA #> 29: -26.4139 146.2558 301.6 303.3 1942 2021 0.0 13.3 29.5 8.9 NA NA NA #> 30: -27.9867 143.8150 130.9 131.4 1999 2021 0.0 14.4 30.0 8.6 NA NA NA #> lat lon elev bar_ht start end r tn tx twd ev tg sn #> solr t5 t10 t20 t50 t1m wr #> 1: 25.9 NA NA NA NA NA NA #> 2: 19.3 NA NA NA NA NA NA #> 3: 25.2 NA NA NA NA NA NA #> 4: 7.2 NA NA NA NA NA NA #> 5: 18.9 NA 24.1 25.0 NA NA 83 #> 6: 18.4 29.2 NA 26.8 NA 26.4 NA #> 7: 7.7 NA NA NA NA NA NA #> 8: 18.9 NA NA NA NA NA NA #> 9: 19.9 NA NA NA NA NA NA #> 10: 18.0 NA NA NA NA NA NA #> 11: 22.6 NA NA NA NA NA NA #> 12: 21.7 NA NA NA NA NA NA #> 13: 22.1 24.1 22.3 23.3 24.0 NA NA #> 14: 24.4 NA 24.7 26.5 26.6 25.8 NA #> 15: 25.2 NA NA NA NA NA NA #> 16: 24.6 NA NA NA NA NA NA #> 17: 20.7 NA NA NA NA NA NA #> 18: 20.4 NA NA NA NA NA NA #> 19: 21.9 21.6 22.2 23.2 22.5 NA 340 #> 20: 12.8 NA NA NA NA NA NA #> 21: 19.5 19.0 20.0 20.0 21.0 21.0 348 #> 22: 14.9 NA NA NA NA NA NA #> 23: 10.8 NA NA NA NA NA NA #> 24: 11.6 17.1 NA 16.7 NA 17.6 354 #> 25: 8.3 16.8 15.5 16.4 16.6 17.3 102 #> 26: 20.1 NA NA NA NA NA NA #> 27: 20.7 22.2 18.6 19.2 19.3 NA 305 #> 28: 21.8 19.3 18.8 19.4 20.9 21.0 197 #> 29: 21.3 NA NA NA NA NA NA #> 30: 23.6 NA NA NA NA NA NA #> solr t5 t10 t20 t50 t1m wr
# }