Skip to content

Commit

Permalink
refresh data (#259)
Browse files Browse the repository at this point in the history
* refresh data

* refresh sysdata

* fix modelled LFS function

---------

Co-authored-by: COWGILL <[email protected]>
Co-authored-by: Matt Cowgill <[email protected]>
  • Loading branch information
3 people authored Nov 16, 2024
1 parent 1ce114b commit 9b2d4d7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: readabs
Type: Package
Title: Download and Tidy Time Series Data from the Australian Bureau of Statistics
Version: 0.4.16.905
Version: 0.4.16.906
Authors@R: c(
person("Matt", "Cowgill", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0422-3300")),
person("Zoe", "Meers", role = "aut", email = "[email protected]"),
Expand Down
4 changes: 4 additions & 0 deletions R/download_data_cube.r
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ download_abs_data_cube <- function(catalogue_string,

available_cubes <- get_available_files(catalogue_string)

cube <- if_else(cube == "MRM1",
"MRM1|MRM%201",
cube)

file_download_url <- available_cubes %>%
dplyr::filter(grepl(cube, file, ignore.case = TRUE)) %>%
dplyr::slice(1) %>% # this gets the first result which is typically the .xlsx file rather than the zip
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/testthat/test-download_data_cube.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test_that("read_lfs_datacube", {
expect_gt(nrow(lm1), 300000)
})

# Test for MRM, which has a different format, and there parsing logic
# Test for MRM, which has a different format, and therefore parsing logic
test_that("read_lfs_datacube - MRM", {
mrm1 <- read_lfs_datacube("MRM1")
expect_s3_class(mrm1, "tbl_df")
Expand Down

0 comments on commit 9b2d4d7

Please sign in to comment.