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 0000000..490bd35 Binary files /dev/null and b/vignettes/cats.rds differ diff --git a/vignettes/readabs_vignette.Rmd b/vignettes/readabs_vignette.Rmd index 2c13a2d..821e38f 100644 --- a/vignettes/readabs_vignette.Rmd +++ b/vignettes/readabs_vignette.Rmd @@ -6,8 +6,10 @@ output: author: "Matt Cowgill" vignette: > %\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`.