Provides functions to interface with Australian Government Bureau of Meteorology ('BOM') data, fetching data and returning a data frame of precis forecasts, historical and current weather data from stations, agriculture bulletin data, 'BOM' 0900 or 1500 weather bulletins and downloading and importing radar and satellite imagery files. Data (c) Australian Government Bureau of Meteorology Creative Commons (CC) Attribution 3.0 licence or Public Access Licence (PAL) as appropriate. See < http://www.bom.gov.au/other/copyright.shtml> for further details.
Provides functions to interface with Australian Government Bureau of Meteorology (BOM) data, fetching data and returning a tidy data frame of précis forecasts, current weather data from stations, ag information bulletins, historical weather data and downloading and importing radar or satellite imagery.
Credit for the name, bomrang, goes to Di Cook, who suggested it while attending the rOpenSci AUUnconf in Brisbane, 2016, upon seeing the vignette that we had assembled during the Unconf.
Install the stable release from CRAN.
install.packages("bomrang")
Or from GitHub for the version in development.
if (!require("remotes")) {install.packages("remotes", repos = "http://cran.rstudio.com/")library("remotes")}install_github("ropensci/bomrang", build_vignettes = TRUE)
Several functions are provided by bomrang to retrieve Australian Bureau of Meteorology (BOM) data. A family of functions retrieve weather data and return tidy data frames;
get_precis_forecast()
, which retrieves the précis (short) forecast;get_current_weather()
, which fetches the current weather for a given
station;get_ag_bulletin()
, which retrieves the agriculture bulletin;get_weather_bulletin()
, which retrieves the BOM 0900 or 1500 bulletins;get_coastal_forecast()
, which returns coastal waters forecasts; andget_historical()
, which retrieves historical daily observations for a given
station.A second group of functions retrieve information pertaining to satellite and radar imagery,
get_available_imagery()
;get_satellite_imagery()
;get_available_radar()
; andget_radar_imagery()
.Vignettes are provided illustrating examples of all functions and a use case.
Please report any issues or bugs.
License:
All code is licenced MIT
All data is copyright Australia Bureau of Meteorology, BOM Copyright
Notice
http://reg.bom.gov.au/other/copyright.shtml
To cite bomrang, please use the output from citation("bomrang")
Please note that the bomrang project is released with a Contributor Code of Conduct. By participating in the bomrang project you agree to abide by its terms.
Australian Bureau of Meteorology (BOM) Weather Data Services
Australian Bureau of Meteorology (BOM) FTP Public Products
Australian Bureau of Meteorology (BOM) Weather Data Services Agriculture Bulletins
Australian Bureau of Meteorology (BOM) Weather Data Services Observation of Rainfall
Australian Bureau of Meteorology (BOM) High-definition satellite images
get_historical()
now fetches data for any station with historical data
available corrected an issue where previously it only fetched data for stations
that currently reported
Enforce standardised output for get_coastal_forecast()
. In some cases BOM
does not report all fields available, bomrang will always report these with
NA
if empty
Add new functionality to interact with and download radar imagery from BOM,
get_available_radar()
and get_radar_imagery()
When using update_station_locations()
or update_forecast_towns()
the user
is now prompted with a message about reproducibility before proceeding
Update code of conduct statement in README to reflect that it only applies to
the bomrang
project
Update authors' list in vignette to include Dean Marchiori
Add links to on-line versions of vignettes from README
Standardise use of vocabulary in README
Reorder vignette to have output from functions before maps
Add maps of historical data completeness and availability to vignette, Appendix 7
Move copyright information from startup message into CITATION file
get_coastal_forecast()
, which fetches the BOM coastal
waters forecastAdd spaces between sentences in some error messages when interacting with the BOM servers
Enhance testing for get_historical()
Handle checking multiple imagery files gracefully without returning warning message if more than one file is to be loaded in current session
Update citations for package to reflect current package and paper citation
Fix corrupted zip file download issue for get_historical()
on Windows
Reduce R requirement back to >= 3.2.0 from 3.5.0
Related to above, check for R version in get_precis_forecast()
and adjust
field names according to the R version due to tidyr
's behaviour
Clean up and reformat documentation, standardise references to packages, links and author e-mail addresses
Remove deprecated functions
Correct field names in get_precis_forecast()
where maximum_temperature
and
minimum_temperature
were reversed
Move rappdirs to Suggests to fix NOTEs on https://cran.rstudio.com/web/checks/check_results_bomrang.html
get_historical()
retrieves historical daily rainfall, min/max temperatures,
or solar exposure. (@jonocarroll)get_precis_forecast()
handles states/territories with no/missing
precipitation data gracefullyrappdirs
to Imports section of DESCRIPTION file to fix missing importMuch faster station location checking using ASDS.foyer::latlon2SA
"BoM" is replaced with "BOM" throughout the package for consistency
janitor
>= 1.0.0 is now required
sf::st_join()
The internal stations_site_list
now is checked against GADM
(Global Administrative Areas), http://www.gadm.org/ to ensure state listed is
correct. This is in response to an error where Alice Springs Airport was
reported in South Australia in the March 2018 update from BOM. There may be
others. The original BOM values for state are in an org_state
column.
However, bomrang
will use the corrected state
column values.
Update code to be compliant with current and future versions of janitor
Vignettes no longer evaluate code on-the-fly that requires BOM servers to
respond in response to CRAN rejecting bomrang
for a failure of a vingette to
build due to this issue
Correct issue with converting the timzeone in ag bulletin to character where the conversion resulted in a vector of numerals, not the expected string of characters, e.g. "EST"
Remove redundant functionality in update_station_locations()
where data were
fetched using tryCatch()
and then again without
Correct comments for ORCID's in DESCRIPTION at the request of CRAN maintainers
Update internal databases of metadata for station locations and URLs
Add new hex-sticker image to README
Enhanced documentation for the cached files in satellite imagery
Update internal databases of metadata for station locations and URLs
get_precis_forecast()
and get_ag_bulletin()
where they
failed to work properly. This fix lessens internal dependencies on dplyr and
removes rlang usage from package.bomrang_cache_list()
, now superceded by manage_cache$list()
bomrang_cache_details()
, now superceded by manage_cache$details()
bomrang_cache_delete()
, now superceded by manage_cache$delete()
bomrang_cache_delete_all()
, now superceded by manage_cache$delete_all()
Fix typo in DESCRIPTION, Scott's ORCID wasn't given as a full URL
Update authors in vignettes to credit everyone who helped write them
Update vignette style to use normal vignette style with table of contents
Fix error in vignette that referred to update_forecast_locations()
, it
should instead refer to update_forecast_towns()
Update internal stations list with latest data from BOM
Document get_current_weather()
functionality in Appendix 4 of bomrang
vignette, thanks @mpadge
Spell checking
Ready for submission to JOSS
Update codemeta json file
Ensure authorship order is the same order in all files
Fix typo in check_states()
Replace warning()
with message()
in get_states()
Recommended station_name
values are separated by spaces in
get_current_weather()
Station names and location names are more consistent in the supplied data and returned data frames.
Lat/Lon values for get_current_weather()
results are now reported using the
values from the internal database, which has a higher degree of accuracy. The
json file values are rounded while the values from the stations list has four
decimal places
Fetch BOM satellite images available through public FTP
New use-case vignette, using bomrang for the WINS project
Welcome message included with statement regarding BOM copyright
Concatenate vignettes into a single file with appendices for descriptions of data returned by functions
Product IDs are included in outputs from get_*()
functions that return a
tidy dataframe
Full station names are reported along with BOM's current name used to refer to a station location. In some cases a station "name" may be the same for both a current and retired station.
Fuzzy matching is used for all functions now when user enters a value for a
desired state, station or the whole country for functions that require a state
argument
Onload a message regarding the copyright and data source,
Data (c) Australian Government Bureau of Meteorology,, Creative Commons (CC) Attribution 3.0 licence or, Public Access Licence (PAL) as appropriate., See http://www.bom.gov.au/other/copyright.shtml
is displayed
the bomrang vignette now contains instructions for use along with appendices that document the data fields and units, rather than separate vingettes
ramifications of updating station lists are now stated clearly in the vignette and help files for applicable functions
a map of BOM stations is included in an appendix of the bomrang vingette
Lat/Lon values are specified to be in decimal degrees in
get_current_weather()
help and vignette
Databases station locations and other metadata are internal an not exposed to the user
Use file.path()
in place of paste0()
The package has been linted,
line lengths are <80 chars,
best practice naming conventions are followed (where possible)
Lint md files
Spellchecking in all files
agrep
is now used in all functions where the user enters state or Australia
values to query BOM data
best practices for programming with dplyr 0.7
using rlang
are now
employed, which reduces the need for the # CRAN NOTE avoidance
"JSONurl_latlon_by_station_name" has been shortened to "JSONurl_site_list".
The DESCRIPTION file now states minimum package versions for packages that are undergoing rapid development
Code has been refactored to be shorter, e.g., xml_bulletin_url
in
get_ag_bulletion()
.get_obs()
has been moved out of the .parse_bulletin()
function for easier
reading/maintenance
fixed a repeat of return(tidy_df)
in get_precis_forecast()
Wrap examples for get_precis_forecast()
in a \dontrun{} tag due to CRAN NOTE
taking too long to run
Use proper GitHub URL in DESCRIPTION file
Run examples for all get_*
functions in package
update_precis_locations()
is now update_forecast_towns()
Add links to vignettes documenting the fields returned in the data frames from
the get_*()
functions
Use the DOI that always points to latest version
Add vignettes describing the data returned from get_precis_forecast()
and
get_ag_bulletin()
, remove this from function help files
Correct documentation reference in README file
get_current_weather()
Include internal databases of station locations and metadata for
get_current_weather()
and get_ag_bulletin()
both derived from the same BOM
station master list
The new database includes a more complete list of JSON URLs and ag bulletin station locations
Generation of the JSON URL list is much faster, now can be updated by the user
in a few seconds as desired using the new update_station_locations()
function
Better tests written for the package
Add a new file describing internal database creation for station locations, metadata and JSON URLs, create_BOM_station_list.md
Hugh Parsonage has joined as a contributor
Added a new function get_current_weather()
to retrieve weather data from
specified BOM weather stations
Added a new function sweep_for_stations()
to find stations used in
get_current_weather()
function, based on distance from a specified latitude
and longitude
Renamed existing functions for more clarity.
get_forecast()
is now get_precis_forecast()
get_bulletin()
is now get_ag_bulletin()
update_locations()
is now update_precis_locations()
All functions will return a data.frame
object, not a tibble
If a server is not responding, the function returns a more meaningful error message on exit
All date/times are returned in POSIXct format
UTC offset is returned in a separate UTC_offset
field for
get_precis_forecast()
for both start_time_local
and end_time_local
fields
Spelling and typo corrections
Enhanced documentation
NA
for all
meteorological valuesAdded a NEWS.md
file to track changes to the package.
New package for fetching BOM forecasts and ag information bulletins