Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.Rmd
#	README.md
#	docs/index.html
  • Loading branch information
adamhsparks committed Jun 3, 2017
2 parents 55dd5a6 + 9f84b75 commit 91b6474
Show file tree
Hide file tree
Showing 25 changed files with 1,075 additions and 517 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bomrang
Type: Package
Title: Fetch Australian Government Bureau of Meteorology Data
Version: 0.0.3-1
Version: 0.0.3-2
Date: 2017-06-03
Authors@R: c(person("Adam", "Sparks", role = c("aut", "cre"),
email = "[email protected]"),
Expand Down Expand Up @@ -33,7 +33,8 @@ Imports:
xml2
Encoding: UTF-8
LazyData: true
Suggests: covr,
Suggests:
covr,
testthat,
knitr,
rmarkdown
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# bomrang 0.0.3-2 2017-06-03

## Minor changes
* 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

# bomrang 0.0.3-1 2017-06-03

## Minor changes
* Add vignette describing the data returned from `get_current_weather()`

# bomrang 0.0.3 2017-06-03

## Major changes
Expand Down
35 changes: 4 additions & 31 deletions R/get_ag_bulletin.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,10 @@
#' }
#'
#' @return
#' Data frame of a Australia BOM agricultural bulletin information
#'
#'\describe{
#' \item{obs-time-local}{Observation time}
#' \item{obs-time-utc}{Observation time (time in UTC)}
#' \item{time-zone}{Time zone for observation}
#' \item{site}{Unique BOM identifier for each station}
#' \item{dist}{BOM rainfall district}
#' \item{station}{BOM station name}
#' \item{start}{Year data collection starts}
#' \item{end}{Year data collection ends (will always be current)}
#' \item{state}{State name (postal code abbreviation)}
#' \item{lat}{Latitude (decimal degrees)}
#' \item{lon}{Longitude (decimal degrees)}
#' \item{elev_m}{Station elevation (metres)}
#' \item{bar_ht}{Bar height (metres)}
#' \item{WMO}{World Meteorological Organization number (unique ID used worldwide)}
#' \item{r}{Rain to 9am (millimetres). \strong{Trace will be reported as 0.01}}
#' \item{tn}{Minimum temperature (degrees Celsius)}
#' \item{tx}{Maximum temperature (degrees Celsius)}
#' \item{twd}{Wet bulb depression (degrees Celsius)}
#' \item{ev}{Evaporation (millimetres)}
#' \item{tg}{Terrestrial minimum temperature (degrees Celsius)}
#' \item{sn}{Sunshine (hours)}
#' \item{t5}{5cm soil temperature (degrees Celsius)}
#' \item{t10}{10cm soil temperature (degrees Celsius)}
#' \item{t20}{20cm soil temperature (degrees Celsius)}
#' \item{t50}{50cm soil temperature (degrees Celsius)}
#' \item{t1m}{1m soil temperature (degrees Celsius)}
#' \item{wr}{Wind run (kilometres)}
#' }
#' Data frame of a Australia BOM agricultural bulletin information. For more
#' details see the vignette "Ag Bulletin Fields":
#' \code{vignette("Ag_Bulletin Fields", package = "bomrang")} for a complete
#' list of fields and units.
#'
#' @examples
#' \dontrun{
Expand Down
6 changes: 3 additions & 3 deletions R/get_current_weather.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#' be nearest to the given coordinate).
#' @details Note that the column \code{local_date_time_full} is set to a
#' \code{POSIXct} object in the local time of the \strong{user}.
#' See the \code{vignette("Current Weather Fields", package = "bomrang")}
#' vignette for a description of the fields and values in the returned database.

#' For more details see the vignette "Current Weather Fields":
#' \code{vignette("Current Weather Fields", package = "bomrang")}
#' for a complete list of fields and units.
#' @examples
#' \dontrun{
#' # warning
Expand Down
29 changes: 4 additions & 25 deletions R/get_precis_forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,10 @@
#' }
#'
#' @return
#' Data frame of a Australia BOM daily forecast in a data frame with the
#' following fields.
#'
#'\describe{
#' \item{aac}{AMOC Area Code, \emph{e.g.}, WA_MW008, a unique identifier for each location}
#' \item{index}{Index value, day 0 to day 7}
#' \item{start_time_local}{Start of forecast date and time in local TZ}
#' \item{end_time_local}{End of forecast date and time in local TZ}
#' \item{UTC_offset}{Hours offset from difference in hours and minutes from
#' Coordinated Universal Time (UTC) for \code{start_time_local} and
#' \code{end_time_local}}
#' \item{start_time_utc}{Start of forecast date and time in UTC}
#' \item{end_time_utc}{End of forecast date and time in UTC}
#' \item{maximum_temperature}{Maximum forecasted temperature (Celsius)}
#' \item{minimum_temperature}{Minimum forecasted temperature (Celsius)}
#' \item{lower_prec_limit}{Lower forecasted precipitation limit (millimetres)}
#' \item{upper_prec_limit}{Upper forecasted precipitation limit (millimetres)}
#' \item{precis}{Précis forecast (a short summary, less than 30 characters)}
#' \item{probability_of_precipitation}{Probability of precipitation (percent)}
#' \item{location}{Named location for forecast}
#' \item{state}{State name (postal code abbreviation)}
#' \item{lon}{Longitude of named location (decimal degrees)}
#' \item{lat}{Latitude of named location (decimal degrees)}
#' \item{elev}{Elevation of named location (metres)}
#' }
#' Data frame of a Australia BOM daily forecast in a tidy data frame. For
#' more details see the vignette "Précis Forecast Fields":
#' \code{vignette("Précis Forecast Fields", package = "bomrang")}
#' for a complete list of fields and units.
#'
#' @examples
#' \dontrun{
Expand Down
63 changes: 8 additions & 55 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,9 @@ This function only takes one parameter, `state`. States or territories are speci
* **AUS** - Australia, returns national forecast including all states/territories.

#### Results

The function, `get_precis_forecast()`, will return a tidy data frame of the weather forecast for the daily forecast with the following fields:

* **aac** - AMOC Area Code, _e.g._, WA_MW008, a unique identifier for each location
* **start_time_local** - Start of forecast date and time in local TZ
* **end_time_local** - End of forecast date and time in local TZ
* **UTC_offset** - Hours offset from difference in hours and minutes from Coordinated Universal Time (UTC) for `start_time_local` and `end_time_local`
* **start_time_utc** - Start of forecast date and time in UTC
* **end_time_utc** - End of forecast date and time in UTC
* **max_temp** - Maximum forecasted temperature (degrees Celsius)
* **min_temp** - Minimum forecasted temperature (degrees Celsius)
* **lower_prcp_limit** - Lower forecasted precipitation limit (millimetres)
* **upper_prcp_limit** - Upper forecasted precipitation limit (millimetres)
* **precis** - Précis forecast (a short summary, less than 30 characters)
* **prob_prcp** - Probability of precipitation (percent)
* **location** - Named location for forecast
* **state** - State name (postal code abbreviation)
* **lon** - Longitude of named location (decimal degrees)
* **lat** - Latitude of named location (decimal degrees)
* **elev** - Elevation of named location (metres).
The function `get_precis_forecast()` will return a tidy data frame of BOM data for
the requested state(s) or territory. For a complete listing of the fields in
the data frame see the `Précis Forecast Fields` vignette.

#### Example

Expand All @@ -94,40 +77,9 @@ This function only takes one parameter, `state`. The `state` parameter allows th
* **AUS** - Australia, returns bulletin for all states/territories.

#### Results

The function, `get_ag_bulletin()`, will return a tidy data frame of the agriculture bulletin with the following fields:

* **obs-time-local** - Observation time
* **obs-time-utc** - Observation time (time in UTC)
* **time-zone** - Time zone for observation
* **site** - Unique BOM identifier for each station
* **dist** - BOM rainfall district
* **station** - BOM station name
* **start** - Year data collection starts
* **end** - Year data collection ends (will always be current)
* **state** - State name (postal code abbreviation)
* **lat** - Latitude (decimal degrees)
* **lon** - Longitude (decimal degrees)
* **elev_m** - Station elevation (metres)
* **bar_ht** - Bar height (metres)
* **WMO** - World Meteorlogical Organization number (unique ID used worldwide)
* **r** - Rain to 9am (millimetres). _Trace will be reported as 0.01_
* **tn** - Minimum temperature (degrees Celsius)
* **tx** - Maximum temperature (degrees Celsius)
* **twd** - Wet bulb depression (degrees Celsius)
* **ev** - Evaporation (millimetres)
* **tg** - Terrestrial minimum temperature (degrees Celsius)
* **sn** - Sunshine (hours)
* **t5** - 5cm soil temperature (degrees Celsius)
* **t10** - 10cm soil temperature (degrees Celsius)
* **t20** - 20cm soil temperature (degrees Celsius)
* **t50** - 50cm soil temperature (degrees Celsius)
* **t1m** - 1m soil temperature (degrees Celsius)
* **wr** - Wind run (kilometres)
* **state** - State name (postal code abbreviation)
* **lat** - Latitude (decimal degrees)
* **lon** - Longitude (decimal degrees).

The function `get_ag_bulletin()` will return a tidy data frame of BOM data for
the requested state(s) or territory. For a complete listing of the fields in
the data frame see the `Ag Bulletin Fields` vignette.

#### Example

Expand Down Expand Up @@ -155,7 +107,8 @@ This function accepts four parameters:

#### Results

The function, `get_current_weather()` will return a tidy data frame of the current and past 72 hours observations for the requested station. The fields returned will vary between stations dependent upon the data that they provide. See the [BOM website](http://www.bom.gov.au/catalogue/observations/about-weather-observations.shtml) for more information.
The function, `get_current_weather()` will return a tidy data frame of the current and past 72 hours observations for the requested station. For a complete listing of the fields in
the data frame see the `Current Weather Fields` vignette.

#### Example

Expand Down
91 changes: 21 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,7 @@ This function only takes one parameter, `state`. States or territories are speci

#### Results

The function, `get_precis_forecast()`, will return a tidy data frame of the weather forecast for the daily forecast with the following fields:

- **aac** - AMOC Area Code, *e.g.*, WA\_MW008, a unique identifier for each location
- **start\_time\_local** - Start of forecast date and time in local TZ
- **end\_time\_local** - End of forecast date and time in local TZ
- **UTC\_offset** - Hours offset from difference in hours and minutes from Coordinated Universal Time (UTC) for `start_time_local` and `end_time_local`
- **start\_time\_utc** - Start of forecast date and time in UTC
- **end\_time\_utc** - End of forecast date and time in UTC
- **max\_temp** - Maximum forecasted temperature (degrees Celsius)
- **min\_temp** - Minimum forecasted temperature (degrees Celsius)
- **lower\_prcp\_limit** - Lower forecasted precipitation limit (millimetres)
- **upper\_prcp\_limit** - Upper forecasted precipitation limit (millimetres)
- **precis** - Précis forecast (a short summary, less than 30 characters)
- **prob\_prcp** - Probability of precipitation (percent)
- **location** - Named location for forecast
- **state** - State name (postal code abbreviation)
- **lon** - Longitude of named location (decimal degrees)
- **lat** - Latitude of named location (decimal degrees)
- **elev** - Elevation of named location (metres).
The function `get_precis_forecast()` will return a tidy data frame of BOM data for the requested state(s) or territory. For a complete listing of the fields in the data frame see the `Précis Forecast Fields` vignette.

#### Example

Expand Down Expand Up @@ -117,38 +99,7 @@ This function only takes one parameter, `state`. The `state` parameter allows th

#### Results

The function, `get_ag_bulletin()`, will return a tidy data frame of the agriculture bulletin with the following fields:

- **obs-time-local** - Observation time
- **obs-time-utc** - Observation time (time in UTC)
- **time-zone** - Time zone for observation
- **site** - Unique BOM identifier for each station
- **dist** - BOM rainfall district
- **station** - BOM station name
- **start** - Year data collection starts
- **end** - Year data collection ends (will always be current)
- **state** - State name (postal code abbreviation)
- **lat** - Latitude (decimal degrees)
- **lon** - Longitude (decimal degrees)
- **elev\_m** - Station elevation (metres)
- **bar\_ht** - Bar height (metres)
- **WMO** - World Meteorlogical Organization number (unique ID used worldwide)
- **r** - Rain to 9am (millimetres). *Trace will be reported as 0.01*
- **tn** - Minimum temperature (degrees Celsius)
- **tx** - Maximum temperature (degrees Celsius)
- **twd** - Wet bulb depression (degrees Celsius)
- **ev** - Evaporation (millimetres)
- **tg** - Terrestrial minimum temperature (degrees Celsius)
- **sn** - Sunshine (hours)
- **t5** - 5cm soil temperature (degrees Celsius)
- **t10** - 10cm soil temperature (degrees Celsius)
- **t20** - 20cm soil temperature (degrees Celsius)
- **t50** - 50cm soil temperature (degrees Celsius)
- **t1m** - 1m soil temperature (degrees Celsius)
- **wr** - Wind run (kilometres)
- **state** - State name (postal code abbreviation)
- **lat** - Latitude (decimal degrees)
- **lon** - Longitude (decimal degrees).
The function `get_ag_bulletin()` will return a tidy data frame of BOM data for the requested state(s) or territory. For a complete listing of the fields in the data frame see the `Ag Bulletin Fields` vignette.

#### Example

Expand Down Expand Up @@ -199,7 +150,7 @@ This function accepts four parameters:

#### Results

The function, `get_current_weather()` will return a tidy data frame of the current and past 72 hours observations for the requested station. The fields returned will vary between stations dependent upon the data that they provide. See the [BOM website](http://www.bom.gov.au/catalogue/observations/about-weather-observations.shtml) for more information.
The function, `get_current_weather()` will return a tidy data frame of the current and past 72 hours observations for the requested station. For a complete listing of the fields in the data frame see the `Current Weather Fields` vignette.

#### Example

Expand All @@ -220,26 +171,26 @@ head(Melbourne_weather)
## 5 4 95936 Melbourne (Olympic Park) IDV60801
## 6 5 95936 Melbourne (Olympic Park) IDV60801
## local_date_time local_date_time_full aifstime_utc lat lon
## 1 03/09:30pm 2017-06-03 21:30:00 2017-06-03 11:30:00 -37.8 145
## 2 03/09:00pm 2017-06-03 21:00:00 2017-06-03 11:00:00 -37.8 145
## 3 03/08:30pm 2017-06-03 20:30:00 2017-06-03 10:30:00 -37.8 145
## 4 03/08:00pm 2017-06-03 20:00:00 2017-06-03 10:00:00 -37.8 145
## 5 03/07:30pm 2017-06-03 19:30:00 2017-06-03 09:30:00 -37.8 145
## 6 03/07:00pm 2017-06-03 19:00:00 2017-06-03 09:00:00 -37.8 145
## 1 03/10:00pm 2017-06-03 22:00:00 2017-06-03 12:00:00 -37.8 145
## 2 03/09:30pm 2017-06-03 21:30:00 2017-06-03 11:30:00 -37.8 145
## 3 03/09:00pm 2017-06-03 21:00:00 2017-06-03 11:00:00 -37.8 145
## 4 03/08:30pm 2017-06-03 20:30:00 2017-06-03 10:30:00 -37.8 145
## 5 03/08:00pm 2017-06-03 20:00:00 2017-06-03 10:00:00 -37.8 145
## 6 03/07:30pm 2017-06-03 19:30:00 2017-06-03 09:30:00 -37.8 145
## apparent_t cloud cloud_type delta_t gust_kmh gust_kt air_temp dewpt
## 1 7.8 - - 0.1 0 0 8.3 8.0
## 2 7.9 - - 0.2 0 0 8.4 8.0
## 3 8.2 - - 0.4 0 0 8.7 7.9
## 4 8.5 - - 0.5 0 0 9.0 7.9
## 5 9.1 - - 0.7 0 0 9.5 8.1
## 6 9.6 - - 0.9 0 0 10.0 8.1
## 1 7.9 - - 0.0 0 0 8.3 8.2
## 2 7.8 - - 0.1 0 0 8.3 8.0
## 3 7.9 - - 0.2 0 0 8.4 8.0
## 4 8.2 - - 0.4 0 0 8.7 7.9
## 5 8.5 - - 0.5 0 0 9.0 7.9
## 6 9.1 - - 0.7 0 0 9.5 8.1
## press press_msl press_qnh press_tend rain_trace rel_hum sea_state
## 1 1030.8 1030.8 1030.8 - 0 98 -
## 2 1030.8 1030.8 1030.8 - 0 97 -
## 3 1031.0 1031.0 1031.0 - 0 95 -
## 4 1031.2 1031.2 1031.2 - 0 93 -
## 5 1031.3 1031.3 1031.3 - 0 91 -
## 6 1031.3 1031.3 1031.3 - 0 88 -
## 1 1030.8 1030.8 1030.8 - 0 99 -
## 2 1030.8 1030.8 1030.8 - 0 98 -
## 3 1030.8 1030.8 1030.8 - 0 97 -
## 4 1031.0 1031.0 1031.0 - 0 95 -
## 5 1031.2 1031.2 1031.2 - 0 93 -
## 6 1031.3 1031.3 1031.3 - 0 91 -
## swell_dir_worded vis_km weather wind_dir wind_spd_kmh wind_spd_kt
## 1 - 10 - CALM 0 0
## 2 - 10 - CALM 0 0
Expand Down
Loading

0 comments on commit 91b6474

Please sign in to comment.