From d242f35c0554068a203efc8cc3972335d8c02d73 Mon Sep 17 00:00:00 2001 From: Matt Cowgill Date: Mon, 24 May 2021 13:28:05 +1000 Subject: [PATCH] prepare for CRAN submission (#155) --- DESCRIPTION | 5 ++--- NEWS.md | 6 ++---- R/search_files.R | 2 +- man/search_files.Rd | 2 +- vignettes/cats.rds | Bin 0 -> 488 bytes vignettes/readabs_vignette.Rmd | 19 ++++++++++++++++--- 6 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 vignettes/cats.rds diff --git a/DESCRIPTION b/DESCRIPTION index 4f34689..e2d4998 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: readabs Type: Package Title: Download and Tidy Time Series Data from the Australian Bureau of Statistics -Version: 0.4.8.903 +Version: 0.4.9 Authors@R: c( person("Matt", "Cowgill", role = c("aut", "cre"), email = "mattcowgill@gmail.com", comment = c(ORCID = "0000-0003-0422-3300")), person("Zoe", "Meers", role = "aut", email = "zoe.meers@sydney.edu.au"), @@ -11,10 +11,9 @@ Authors@R: c( Maintainer: Matt Cowgill Description: Downloads, imports, and tidies time series data from the Australian Bureau of Statistics . -Date: 2021-02-07 +Date: 2021-05-24 License: MIT + file LICENSE Encoding: UTF-8 -LazyData: true Depends: R (>= 3.5) Imports: readxl (>= 1.2.0), diff --git a/NEWS.md b/NEWS.md index c3f9d7c..ce5133b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,12 +4,10 @@ # readabs 0.4.8.902 * `check_latest_date()` function to check latest observation date for ABS time series -# readabs 0.4.8.901 -* Residual upstream dependence on curl eliminated - -# readabs 0.4.8.900 +# readabs 0.4.9 * `read_lfs_grossflows()` convenience function added * `utils::download.file()` used rather than `curl::curl_download()` +* Residual upstream dependence on curl eliminated * Workaround implemented for changes to ABS Weekly Payrolls release * `search_catalogues()` function added to make data cubes easier to find diff --git a/R/search_files.R b/R/search_files.R index 7c99c08..ef1a599 100644 --- a/R/search_files.R +++ b/R/search_files.R @@ -6,7 +6,7 @@ #' list of files within the catalogue. #' @export #' @examples -#' search_files("GM1", "labour-force-australia") +#' \dontrun{ search_files("GM1", "labour-force-australia") } search_files <- function(string, catalogue, refresh = FALSE) { files <- show_available_files(catalogue_string = catalogue, diff --git a/man/search_files.Rd b/man/search_files.Rd index 207982c..f467b6e 100644 --- a/man/search_files.Rd +++ b/man/search_files.Rd @@ -18,5 +18,5 @@ list of files within the catalogue.} Search for a file within an ABS catalogue } \examples{ -search_files("GM1", "labour-force-australia") +\dontrun{ search_files("GM1", "labour-force-australia") } } diff --git a/vignettes/cats.rds b/vignettes/cats.rds new file mode 100644 index 0000000000000000000000000000000000000000..490bd35e1ddbaf47da6e9e74f48143527b4f20a7 GIT binary patch literal 488 zcmVLLh&dr)xpxX?-PCgMStwIF!#$1dzm zUXn>WI?2TO(c)o2{0sK)-GlX6r?rU*J#1ar!zA9xE@3%6eD z$M-JXL*E7(Om-Yih!2=1Mv_8> zGf;*{JO{&N_Li$Nm#ah0E!JR4+_{|HnjAvO1q)dg^;1wcEGEa=@DvO}7q!|H;{r5! zES@{F($cs|{r} z+FbXI$@P8^42MG>LhbkDzy}*VUyx%?q=T3G!RsiFZ#O%eK{W!pv7tc{!9X+DQNLry zsY=zY^ToF=4MKI_-wWycH^WuU_3K}Jir0ayhIn{Sh?<|EOyV_{kmQ3SYGsg4f0U+k zuJjqiJnK30qqgBy(bbN?fRH^qxmm+1Q7YY5a_CRWui;v{$H! %\VignetteIndexEntry{Using readabs} - %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} + %\VignetteEngine{knitr::rmarkdown} +editor_options: + chunk_output_type: console --- ```{r setup, echo = FALSE, message = FALSE} @@ -294,17 +296,28 @@ Let's say I want to download cube GM1, the gross flows spreadsheet from the mont Let's look for the name of the catalogue: -```{r} +```{r, eval = FALSE} search_catalogues("labour force") ``` +```{r, eval = FALSE, include = FALSE} +cats <- search_catalogues("labour force") +saveRDS(cats, "cats.rds") +``` +```{r, echo = FALSE} +readRDS("cats.rds") +``` It looks like `labour-force-australia` is the catalogue name for the monthly Labour Force survey. Now I need to find the filename for the gross flows spreadsheet, GM1. -```{r} +```{r, eval = FALSE} search_files("GM1", "labour-force-australia") ``` +```{r, echo = FALSE} +x <- "GM1.xlsx" +x +``` The GM1 table is, conveniently enough, called `GM1.xlsx`.