From cc8c435ad134ebcf02f9ef018f0788c7e1a0f278 Mon Sep 17 00:00:00 2001 From: adamhsparks Date: Fri, 28 Apr 2017 19:23:07 +1000 Subject: [PATCH] First commit, I hope it doesn't come back --- .Rbuildignore | 9 ++ .gitignore | 4 + .travis.yml | 8 ++ BOMRang.Rproj | 19 ++++ CONDUCT.md | 25 +++++ DESCRIPTION | 30 ++++++ LICENSE | 2 + NAMESPACE | 4 + NEWS.md | 6 ++ R/BOMRang-package.r | 5 + R/get_BOM_forecast.R | 101 ++++++++++++++++++ README.Rmd | 19 ++++ README.md | 15 +++ appveyor.yml | 42 ++++++++ codecov.yml | 1 + docs/LICENSE | 2 + docs/authors.html | 111 +++++++++++++++++++ docs/index.html | 116 ++++++++++++++++++++ docs/jquery.sticky-kit.min.js | 9 ++ docs/link.svg | 12 +++ docs/news/index.html | 119 +++++++++++++++++++++ docs/pkgdown.css | 154 +++++++++++++++++++++++++++ docs/pkgdown.js | 8 ++ docs/reference/BOMRang.html | 110 +++++++++++++++++++ docs/reference/get_BOM_forecast.html | 125 ++++++++++++++++++++++ docs/reference/index.html | 139 ++++++++++++++++++++++++ inst/CITATION | 11 ++ man/BOMRang.Rd | 10 ++ man/get_BOM_forecast.Rd | 21 ++++ 29 files changed, 1237 insertions(+) create mode 100644 .Rbuildignore create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 BOMRang.Rproj create mode 100644 CONDUCT.md create mode 100644 DESCRIPTION create mode 100644 LICENSE create mode 100644 NAMESPACE create mode 100644 NEWS.md create mode 100644 R/BOMRang-package.r create mode 100644 R/get_BOM_forecast.R create mode 100644 README.Rmd create mode 100644 README.md create mode 100644 appveyor.yml create mode 100644 codecov.yml create mode 100644 docs/LICENSE create mode 100644 docs/authors.html create mode 100644 docs/index.html create mode 100644 docs/jquery.sticky-kit.min.js create mode 100644 docs/link.svg create mode 100644 docs/news/index.html create mode 100644 docs/pkgdown.css create mode 100644 docs/pkgdown.js create mode 100644 docs/reference/BOMRang.html create mode 100644 docs/reference/get_BOM_forecast.html create mode 100644 docs/reference/index.html create mode 100644 inst/CITATION create mode 100644 man/BOMRang.Rd create mode 100644 man/get_BOM_forecast.Rd diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 00000000..7616e10a --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,9 @@ +^.*\.Rproj$ +^\.Rproj\.user$ +^CONDUCT\.md$ +^README\.Rmd$ +^README-.*\.png$ +^\.travis\.yml$ +^appveyor\.yml$ +^codecov\.yml$ +^docs$ diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..5b6a0652 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..756ad0fe --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r + +language: R +sudo: false +cache: packages + +after_success: + - Rscript -e 'covr::codecov()' diff --git a/BOMRang.Rproj b/BOMRang.Rproj new file mode 100644 index 00000000..49f2092f --- /dev/null +++ b/BOMRang.Rproj @@ -0,0 +1,19 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/CONDUCT.md b/CONDUCT.md new file mode 100644 index 00000000..52a673e8 --- /dev/null +++ b/CONDUCT.md @@ -0,0 +1,25 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free experience for +everyone, regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. + +Examples of unacceptable behavior by participants include the use of sexual language or +imagery, derogatory comments or personal attacks, trolling, public or private harassment, +insults, or other unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, +commits, code, wiki edits, issues, and other contributions that are not aligned to this +Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed +from the project team. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by +opening an issue or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the Contributor Covenant +(http:contributor-covenant.org), version 1.0.0, available at +http://contributor-covenant.org/version/1/0/0/ diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 00000000..08452db6 --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,30 @@ +Package: BOMRang +Type: Package +Title: Fetch Australian Government Bureau of Meteorology Data +Version: 0.0.1-1 +Authors@R: c(person("Adam", "Sparks", role = c("aut", "cre"), + email = "adamhsparks@gmail.com"), + person("Keith", "Pembleton", role = "aut", + email = "keith.pembleton@usq.edu.au")) +Description: Fetches Fetch Australian Government Bureau of Meteorology Weather + forecasts and returns a tidy data frame of the current and next six days + weather. +URL: https://github.com/adamhsparks/BOMRang +BugReports: https://github.com/adamhsparks/BOMRang/issues +License: MIT + file LICENSE +Depends: + R (>= 3.2.0) +Imports: + dplyr, + foreign, + lubridate, + plyr, + stringr, + tibble, + xml2 +Encoding: UTF-8 +LazyData: true +Suggests: covr +RoxygenNote: 6.0.1 +NeedsCompilation: no +ByteCompile: TRUE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..9ab6c360 --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2017 +COPYRIGHT HOLDER: Your name goes here diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 00000000..3713919d --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,4 @@ +# Generated by roxygen2: do not edit by hand + +export(get_BOM_forecast) +importFrom(dplyr,"%>%") diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 00000000..026299dc --- /dev/null +++ b/NEWS.md @@ -0,0 +1,6 @@ +# BOMRang 0.0.1-1 + +* Added a `NEWS.md` file to track changes to the package. +* New package for fetching BOM forecasts + + diff --git a/R/BOMRang-package.r b/R/BOMRang-package.r new file mode 100644 index 00000000..7453518a --- /dev/null +++ b/R/BOMRang-package.r @@ -0,0 +1,5 @@ +#' BOMRang. +#' +#' @name BOMRang +#' @docType package +NULL diff --git a/R/get_BOM_forecast.R b/R/get_BOM_forecast.R new file mode 100644 index 00000000..5039cfaf --- /dev/null +++ b/R/get_BOM_forecast.R @@ -0,0 +1,101 @@ + +#' Get BOM Forecast for Queensland +#' +#'Fetch the BOM forecast and create a data frame object that can be used for +#'interpolating. +#' +#' @return +#' Data frame of a Australia BOM forecast for Queensland for max temperature, +#' min temperature and corresponding locations. +#' +#' @examples +#' \dontrun{ +#' BOM_forecast <- get_BOM_forecast() +#' } +#' @export +#' +#' @importFrom dplyr %>% +get_BOM_forecast <- function() { + # BOM station list - a .dbf file (part of a shapefile of station locations) + # AAC codes can be used to add lat/lon to the forecast + utils::download.file( + "ftp://ftp.bom.gov.au/anon/home/adfd/spatial/IDM00013.dbf", + destfile = paste0(tempdir(), "AAC_codes.dbf"), + mode = "wb" + ) + + AAC_codes <- + foreign::read.dbf(paste0(tempdir(), "AAC_codes.dbf"), as.is = TRUE) + AAC_codes <- AAC_codes[, c(2:3, 7:9)] + + # fetch BOM foreast for Qld + xmlforecast <- + xml2::read_xml("ftp://ftp.bom.gov.au/anon/gen/fwo/IDQ11295.xml") + + # extract locations from forecast + areas <- xml2::xml_find_all(xmlforecast, "//forecast/area") + forecast_locations <- + dplyr::bind_rows(lapply(xml2::xml_attrs(areas), as.list)) + + # join locations with lat/lon values for mapping and interpolation + forecast_locations <- dplyr::left_join(forecast_locations, + AAC_codes, + by = c("aac" = "AAC", + "description" = "PT_NAME")) + + # unlist and add the locations aac code + forecasts <- + lapply(xml2::xml_find_all(xmlforecast, "//forecast/area"), + xml2::as_list) + forecasts <- plyr::llply(forecasts, unlist) + names(forecasts) <- forecast_locations$aac + + # get all the and tags (the forecast) + eltext <- xml2::xml_find_all(xmlforecast, "//element | //text") + + # extract and clean (if needed) (the labels for the forecast) + labs <- trimws(xml2::xml_attrs(eltext, "type")) + + # use a loop to turn list of named character elements into a list of dataframes + # with the location aac code for each line of the data frame + y <- vector("list") + for (i in unique(names(forecasts))) { + x <- data.frame( + keyName = names(forecasts[[i]]), + value = forecasts[[i]], + row.names = NULL + ) + z <- names(forecasts[i]) + x <- data.frame(rep(as.character(z), nrow(x)), x) + y[[i]] <- x + } + + # combind list into a single dataframe + y <- dplyr::rbind_all(y, fill = TRUE) + + # add the forecast description to the dataframe + forecast <- data.frame(y, labs, rep(NA, length(labs))) + names(forecast) <- c("aac", "keyName", "value", "labs", "element") + + # label for min/max temperature in a new col to use for sorting in next step + forecast$element <- + as.character(stringr::str_match(forecast$labs, + "air_temperature_[[:graph:]]{7}")) + + # convert object to tibble and remove rows we don't need, e.g., precip + # keep only max and min temp + forecast <- + tibble::as_tibble(stats::na.omit(forecast[, c(1, 3, 5)])) + + # add dates to the data frame + forecast$date <- c(Sys.Date(), + rep(seq( + lubridate::ymd(Sys.Date() + 1), + lubridate::ymd(Sys.Date() + 6), + by = "1 day" + ), + each = 2)) + + forecast <- + dplyr::left_join(forecast, forecast_locations, by = "aac") +} diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 00000000..8144f2d8 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,19 @@ +--- +output: github_document +--- + + + +# _BOMRang_: Fetch Australian Government Bureau of Meteorology Data + +[![Travis-CI Build Status](https://travis-ci.org/.svg?branch=master)](https://travis-ci.org/) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/adamhsparks/BOMRang?branch=master&svg=true)](https://ci.appveyor.com/project/adamhsparks/BOMRang) +[![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-brightgreen.svg)](https://github.com/adamhsparks/BOMRang/commits/master) +[![minimal R version](https://img.shields.io/badge/R%3E%3D-`r as.character(getRversion())`-brightgreen.svg)](https://cran.r-project.org/) + +Fetches Fetch Australian Government Bureau of Meteorology Weather forecasts and returns a tidy data frame in a _Tibble_ of the current and next six days weather. + +_Limited to Queensland and temperature values only at the moment_ + +## Meta +Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. diff --git a/README.md b/README.md new file mode 100644 index 00000000..b7e9d173 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ + + +*BOMRang*: Fetch Australian Government Bureau of Meteorology Data +================================================================= + +[![Travis-CI Build Status](https://travis-ci.org/.svg?branch=master)](https://travis-ci.org/) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/adamhsparks/BOMRang?branch=master&svg=true)](https://ci.appveyor.com/project/adamhsparks/BOMRang) [![Last-changedate](https://img.shields.io/badge/last%20change-2017--04--28-brightgreen.svg)](https://github.com/adamhsparks/BOMRang/commits/master) [![minimal R version](https://img.shields.io/badge/R%3E%3D-3.4.0-brightgreen.svg)](https://cran.r-project.org/) + +Fetches Fetch Australian Government Bureau of Meteorology Weather forecasts and returns a tidy data frame in a *Tibble* of the current and next six days weather. + +*Limited to Queensland and temperature values only at the moment* + +Meta +---- + +Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..e32d316c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,42 @@ +# DO NOT CHANGE the "init" and "install" sections below + +# Download script file from GitHub +init: + ps: | + $ErrorActionPreference = "Stop" + Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" + Import-Module '..\appveyor-tool.ps1' + +install: + ps: Bootstrap + +# Adapt as necessary starting from here + +build_script: + - travis-tool.sh install_deps + +test_script: + - travis-tool.sh run_tests + +on_failure: + - 7z a failure.zip *.Rcheck\* + - appveyor PushArtifact failure.zip + +artifacts: + - path: '*.Rcheck\**\*.log' + name: Logs + + - path: '*.Rcheck\**\*.out' + name: Logs + + - path: '*.Rcheck\**\*.fail' + name: Logs + + - path: '*.Rcheck\**\*.Rout' + name: Logs + + - path: '\*_*.tar.gz' + name: Bits + + - path: '\*_*.zip' + name: Bits diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..69cb7601 --- /dev/null +++ b/codecov.yml @@ -0,0 +1 @@ +comment: false diff --git a/docs/LICENSE b/docs/LICENSE new file mode 100644 index 00000000..9ab6c360 --- /dev/null +++ b/docs/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2017 +COPYRIGHT HOLDER: Your name goes here diff --git a/docs/authors.html b/docs/authors.html new file mode 100644 index 00000000..c8ccc9f1 --- /dev/null +++ b/docs/authors.html @@ -0,0 +1,111 @@ + + + + + + + + +Authors • BOMRang + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
    +
  • +

    Adam Sparks. Author, maintainer. +

    +
  • +
  • +

    Keith Pembleton. Author. +

    +
  • +
+ +
+ +
+ + +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..f012e5fb --- /dev/null +++ b/docs/index.html @@ -0,0 +1,116 @@ + + + + + + + +Fetch Australian Government Bureau of Meteorology Data • BOMRang + + + + + + +
+
+ + + +
+
+ + + + +
+ +
+ + +

Fetches Fetch Australian Government Bureau of Meteorology Weather forecasts and returns a tidy data frame in a Tibble of the current and next six days weather.

+

Limited to Queensland and temperature values only at the moment

+
+

+Meta

+

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

+
+
+
+
+ + + +
+ + +
+ +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/jquery.sticky-kit.min.js b/docs/jquery.sticky-kit.min.js new file mode 100644 index 00000000..e2a3c6de --- /dev/null +++ b/docs/jquery.sticky-kit.min.js @@ -0,0 +1,9 @@ +/* + Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net +*/ +(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k)); +if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("
"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q, +u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),eb&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}), +a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize", +y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n + + + + + diff --git a/docs/news/index.html b/docs/news/index.html new file mode 100644 index 00000000..63aaee39 --- /dev/null +++ b/docs/news/index.html @@ -0,0 +1,119 @@ + + + + + + + + +All news • BOMRang + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ +
+ + +
+
+

+BOMRang 0.0.1-1

+
    +
  • Added a NEWS.md file to track changes to the package.
  • +
  • New package for fetching BOM forecasts
  • +
+
+
+
+ + + +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css new file mode 100644 index 00000000..9c437c74 --- /dev/null +++ b/docs/pkgdown.css @@ -0,0 +1,154 @@ +/* Sticker footer */ +body > .container { + display: flex; + padding-top: 60px; + min-height: calc(100vh); + flex-direction: column; +} + +body > .container .row { + flex: 1; +} + +footer { + margin-top: 45px; + padding: 35px 0 36px; + border-top: 1px solid #e5e5e5; + color: #666; + display: flex; +} +footer p { + margin-bottom: 0; +} +footer div { + flex: 1; +} +footer .pkgdown { + text-align: right; +} +footer p { + margin-bottom: 0; +} + +img.icon { + float: right; +} + +/* Section anchors ---------------------------------*/ + +a.anchor { + margin-left: -30px; + display:inline-block; + width: 30px; + height: 30px; + visibility: hidden; + + background-image: url(./link.svg); + background-repeat: no-repeat; + background-size: 20px 20px; + background-position: center center; +} + +.hasAnchor:hover a.anchor { + visibility: visible; +} + +@media (max-width: 767px) { + .hasAnchor:hover a.anchor { + visibility: hidden; + } +} + + +/* Fixes for fixed navbar --------------------------*/ + +.contents h1, .contents h2, .contents h3, .contents h4 { + padding-top: 60px; + margin-top: -60px; +} + +/* Static header placement on mobile devices */ +@media (max-width: 767px) { + .navbar-fixed-top { + position: absolute; + } + .navbar { + padding: 0; + } +} + + +/* Sidebar --------------------------*/ + +#sidebar { + margin-top: 30px; +} +#sidebar h2 { + font-size: 1.5em; + margin-top: 1em; +} + +#sidebar h2:first-child { + margin-top: 0; +} + +#sidebar .list-unstyled li { + margin-bottom: 0.5em; +} + +/* Reference index & topics ----------------------------------------------- */ + +.ref-index th {font-weight: normal;} +.ref-index h2 {font-size: 20px;} + +.ref-index td {vertical-align: top;} +.ref-index .alias {width: 40%;} +.ref-index .title {width: 60%;} + +.ref-index .alias {width: 40%;} +.ref-index .title {width: 60%;} + +.ref-arguments th {text-align: right; padding-right: 10px;} +.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments .name {width: 20%;} +.ref-arguments .desc {width: 80%;} + +/* Nice scrolling for wide elements --------------------------------------- */ + +table { + display: block; + overflow: auto; +} + +/* Syntax highlighting ---------------------------------------------------- */ + +pre { + word-wrap: normal; + word-break: normal; + border: 1px solid #eee; +} + +pre, code { + background-color: #f8f8f8; + color: #333; +} + +pre img { + background-color: #fff; + display: block; +} + +code a, pre a { + color: #375f84; +} + +.fl {color: #1514b5;} +.fu {color: #000000;} /* function */ +.ch,.st {color: #036a07;} /* string */ +.kw {color: #264D66;} /* keyword */ +.co {color: #888888;} /* comment */ + +.message { color: black; font-weight: bolder;} +.error { color: orange; font-weight: bolder;} +.warning { color: #6A0366; font-weight: bolder;} + diff --git a/docs/pkgdown.js b/docs/pkgdown.js new file mode 100644 index 00000000..c8b38c49 --- /dev/null +++ b/docs/pkgdown.js @@ -0,0 +1,8 @@ +$(function() { + $("#sidebar").stick_in_parent({offset_top: 40}); + $('body').scrollspy({ + target: '#sidebar', + offset: 60 + }); + +}); diff --git a/docs/reference/BOMRang.html b/docs/reference/BOMRang.html new file mode 100644 index 00000000..d9a00aed --- /dev/null +++ b/docs/reference/BOMRang.html @@ -0,0 +1,110 @@ + + + + + + + + +BOMRang. — BOMRang • BOMRang + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

BOMRang.

+ + + + +
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/get_BOM_forecast.html b/docs/reference/get_BOM_forecast.html new file mode 100644 index 00000000..2f3c4598 --- /dev/null +++ b/docs/reference/get_BOM_forecast.html @@ -0,0 +1,125 @@ + + + + + + + + +Get BOM Forecast for Queensland — get_BOM_forecast • BOMRang + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Fetch the BOM forecast and create a data frame object that can be used for +interpolating.

+ + +
get_BOM_forecast()
+ +

Value

+ +

Data frame of a Australia BOM forecast for Queensland for max temperature, +min temperature and corresponding locations.

+ + +

Examples

+
not_run({ + BOM_forecast <- get_BOM_forecast() +})
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/index.html b/docs/reference/index.html new file mode 100644 index 00000000..9c3679a8 --- /dev/null +++ b/docs/reference/index.html @@ -0,0 +1,139 @@ + + + + + + + + +Function reference • BOMRang + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+

All functions

+

+
+

BOMRang

+

BOMRang.

+

get_BOM_forecast

+

Get BOM Forecast for Queensland

+
+
+ + +
+ + +
+ + + diff --git a/inst/CITATION b/inst/CITATION new file mode 100644 index 00000000..b8085e23 --- /dev/null +++ b/inst/CITATION @@ -0,0 +1,11 @@ + +year <- sub("-.*", "", meta$Date) +note <- sprintf("R package version %s", meta$Version) + +bibentry(bibtype = "Manual", + title = "{BOMRang}: Fetch Australian Government Bureau of Meteorology Weather Data", + author = c(person("Adam", "Sparks"), + person("Keith", "Pembleton")), + year = year, + note = note, + url = "https://github.com/ToowoombaTrio/BOMRang") diff --git a/man/BOMRang.Rd b/man/BOMRang.Rd new file mode 100644 index 00000000..86f7c27b --- /dev/null +++ b/man/BOMRang.Rd @@ -0,0 +1,10 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BOMRang-package.r +\docType{package} +\name{BOMRang} +\alias{BOMRang} +\alias{BOMRang-package} +\title{BOMRang.} +\description{ +BOMRang. +} diff --git a/man/get_BOM_forecast.Rd b/man/get_BOM_forecast.Rd new file mode 100644 index 00000000..6cbb4bdf --- /dev/null +++ b/man/get_BOM_forecast.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_BOM_forecast.R +\name{get_BOM_forecast} +\alias{get_BOM_forecast} +\title{Get BOM Forecast for Queensland} +\usage{ +get_BOM_forecast() +} +\value{ +Data frame of a Australia BOM forecast for Queensland for max temperature, +min temperature and corresponding locations. +} +\description{ +Fetch the BOM forecast and create a data frame object that can be used for +interpolating. +} +\examples{ +\dontrun{ +BOM_forecast <- get_BOM_forecast() +} +}