From 0bcf03756016ac5632a40361e3b75728562d6fc9 Mon Sep 17 00:00:00 2001 From: peteowen1 Date: Wed, 9 Oct 2024 12:48:26 +1100 Subject: [PATCH] filter out holidays with NA date update roxygen version add url and bug reports to description add package name and describe in seifa.R --- DESCRIPTION | 7 +++++-- R/seifa.R | 18 +++++++++--------- data-raw/create_au_holidays.R | 1 + data/auholidays.rda | Bin 3105 -> 3080 bytes man/get_seifa.Rd | 4 ++-- man/get_seifa_index_sheet.Rd | 2 +- pkgdown/_pkgdown.yml | 2 +- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 201b592..3dcee06 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,7 +18,7 @@ Maintainer: Will Mackey License: GPL-3 Description: This package provides data and functions for working with common structures and classifications used in Australia. Depends: - R (>= 3.5) + R (>= 3.5) Imports: dplyr (>= 0.7), lifecycle, @@ -33,11 +33,14 @@ Imports: parsedate Suggests: testthat, + curl, sf, here, ggplot2, bench Encoding: UTF-8 LazyData: true -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 +URL: https://runapp-aus.github.io/strayr/ +BugReports: https://github.com/runapp-aus/strayr/issues/ RdMacros: lifecycle diff --git a/R/seifa.R b/R/seifa.R index be6b3e9..f9794f8 100644 --- a/R/seifa.R +++ b/R/seifa.R @@ -14,7 +14,7 @@ #' \url{https://www.abs.gov.au/statistics/people/people-and-communities/socio-economic-indexes-areas-seifa-australia/2021} #' @param structure character value for the desired spatial area. Must be one of: -#' \itemize{ +#' \describe{ #' \item{sa1}{ - download size 51.6 MB} #' \item{sa2}{ - download size 1.9 MB} #' \item{lga}{ - download size 660 KB} @@ -22,7 +22,7 @@ #' \item{suburb}{ - download size 11.3 MB} #' } #' @param data_subclass character vector matching available SEIFA indexes: -#' \itemize{ +#' \describe{ #' \item{irsed}{ - Index of Relative Socio-economic Disadvantage} #' \item{irsead}{ - Index of Relative Socio-economic Advantage and Disadvantage} #' \item{ier}{ - Index of Economic Resources} @@ -297,18 +297,18 @@ get_seifa_index_sheet <- function(filename, sheetname, structure = c("sa1", "sa2 col_names = column_names, na = c("", "NA", "-") ) %>% - dplyr::filter(if_all(ends_with(c("_name","_code")), ~ !is.na(.x))) %>% - select(-starts_with("blank")) %>% - mutate( + dplyr::filter(dplyr::if_all(dplyr::ends_with(c("_name","_code")), ~ !is.na(.x))) %>% + dplyr::select(-dplyr::starts_with("blank")) %>% + dplyr::mutate( structure = structure, year = year ) %>% - mutate(across( - .cols = any_of(ends_with("_code")), # Specify the column name + dplyr::mutate(dplyr::across( + .cols = dplyr::any_of(ends_with("_code")), # Specify the column name .fns = ~ as.character(.) # Conditionally convert to character )) %>% - relocate(structure) + dplyr::relocate(structure) }) - + return(df) } diff --git a/data-raw/create_au_holidays.R b/data-raw/create_au_holidays.R index f974e30..6beee06 100644 --- a/data-raw/create_au_holidays.R +++ b/data-raw/create_au_holidays.R @@ -16,6 +16,7 @@ raw_data <- package$resources %>% list_rbind() auholidays <- raw_data %>% + dplyr::filter(!is.na(Date)) %>% # 'Friday before the AFL Grand Final' not given a date in VIC holiday data transmute( Date = ymd(Date), Name = coalesce(`Holiday Name`), diff --git a/data/auholidays.rda b/data/auholidays.rda index c2a4eeae2922087d52126e9d9ad63f24c617077c..f4b2466a5da3d255e99897766dbd7b0e090bd9ca 100644 GIT binary patch literal 3080 zcma)8dpOezAOFo}wi$lIn7K3y&63w;E{V=In?^3fI7ppM(h|;GqswWVVTfkoP}DY; zSeGLe6?MizEsi60lypu@bfi zHqnuXG6Ou-$JhVH`}OxTpV#vD>rdB@AN}Kt{9oUAAFErBI)1KpT@N-v9R9k`lGj1n zo4C+2a`^O^RSF&`Z%N9Yks_JI6IE~_1>mQ^8(T*jBk(3RP@3X^GAMN-h>AZPO#3@pP6SWm8zL+}A+Jd?Lk>8UD`fxxr2_oV(;~vC z1DN=1GWkq+(_+w_?cd0KRlB2oixaP5GWPFEt-6?@V|w>Y9E?aKT#;zI^cVTFF2w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B^WuZ$3yIWlYC<|bti=u;&hfmg9e4c&5 NQyXKgwwL1!{{<3uDN6tV diff --git a/man/get_seifa.Rd b/man/get_seifa.Rd index 7a6b679..18edd58 100644 --- a/man/get_seifa.Rd +++ b/man/get_seifa.Rd @@ -12,7 +12,7 @@ get_seifa( } \arguments{ \item{structure}{character value for the desired spatial area. Must be one of: -\itemize{ +\describe{ \item{sa1}{ - download size 51.6 MB} \item{sa2}{ - download size 1.9 MB} \item{lga}{ - download size 660 KB} @@ -21,7 +21,7 @@ get_seifa( }} \item{data_subclass}{character vector matching available SEIFA indexes: -\itemize{ +\describe{ \item{irsed}{ - Index of Relative Socio-economic Disadvantage} \item{irsead}{ - Index of Relative Socio-economic Advantage and Disadvantage} \item{ier}{ - Index of Economic Resources} diff --git a/man/get_seifa_index_sheet.Rd b/man/get_seifa_index_sheet.Rd index afcf52f..6547628 100644 --- a/man/get_seifa_index_sheet.Rd +++ b/man/get_seifa_index_sheet.Rd @@ -21,7 +21,7 @@ get_seifa_index_sheet( important as the shape of the data in the ABS spreadsheets if different for some structures.} \item{data_subclass}{character vector matching available SEIFA indexes: -\itemize{ +\describe{ \item{irsed}{ - Index of Relative Socio-economic Disadvantage} \item{irsead}{ - Index of Relative Socio-economic Advantage and Disadvantage} \item{ier}{ - Index of Economic Resources} diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 48b0d6d..fd3712b 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -1,4 +1,4 @@ -URL: https://runapp-aus.github.io/strayr/ +url: https://runapp-aus.github.io/strayr/ repo: url: