From ab3e0692afc86eab6894a4e5bc6534cb993db45f Mon Sep 17 00:00:00 2001 From: Wojtek Klimowicz Date: Mon, 26 Aug 2024 12:26:33 +0100 Subject: [PATCH] Update workflow and typos --- .github/workflows/R-CMD-check.yaml | 10 +++++++--- README.Rmd | 2 +- README.md | 12 ++++++------ vignettes/Adding_Variables.Rmd | 10 ++++------ vignettes/Replicating_ONS_Publications.Rmd | 10 +++++----- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 25d4a04..0bfa7c9 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -6,9 +6,12 @@ on: pull_request: branches: [main, master] schedule: - - cron: "0 0 * * 2" # Once every 2 weeks on monday + - cron: "0 0 1 * *" # Once a month, to catch bugs with package updates -name: R-CMD-check + +name: R-CMD-check.yaml + +permissions: read-all jobs: R-CMD-check: @@ -31,7 +34,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -49,3 +52,4 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/README.Rmd b/README.Rmd index bdd3474..9a6def2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,7 +16,7 @@ knitr::opts_chunk$set( # tidylfs -[![.github/workflows/R-CMD-check](https://github.com/wklimowicz/tidylfs/actions/workflows/.github/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/wklimowicz/tidylfs/actions/workflows/.github/workflows/R-CMD-check.yaml) +[![R-CMD-check](https://github.com/wklimowicz/tidylfs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/wklimowicz/tidylfs/actions/workflows/R-CMD-check.yaml) ## Installation diff --git a/README.md b/README.md index 61e7519..c009015 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ -[![.github/workflows/R-CMD-check](https://github.com/wklimowicz/tidylfs/actions/workflows/.github/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/wklimowicz/tidylfs/actions/workflows/.github/workflows/R-CMD-check.yaml) +[![R-CMD-check](https://github.com/wklimowicz/tidylfs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/wklimowicz/tidylfs/actions/workflows/R-CMD-check.yaml) ## Installation @@ -46,16 +46,16 @@ lfs <- lfs_compile(lfs_directory = "lfs_rds_folder/") To reproduce official ONS publications, such as -- Unemployent [UNEM01 - NSA](https://www.ons.gov.uk/employmentandlabourmarket/peoplenotinwork/unemployment/datasets/unemploymentbyageanddurationnotseasonallyadjustedunem01nsa) +- Unemployent [UNEM01 + NSA](https://www.ons.gov.uk/employmentandlabourmarket/peoplenotinwork/unemployment/datasets/unemploymentbyageanddurationnotseasonallyadjustedunem01nsa) ``` r lfs %>% lfs_summarise_unemployment(QUARTER) ``` -- Salary by occupation - [EARN06](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsbyoccupationearn06) +- Salary by occupation + [EARN06](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsbyoccupationearn06) ``` r lfs %>% @@ -68,7 +68,7 @@ lfs %>% Extending them is easy: -- Unemployment by quarter, sex, and age category +- Unemployment by quarter, sex, and age category ``` r lfs %>% diff --git a/vignettes/Adding_Variables.Rmd b/vignettes/Adding_Variables.Rmd index 0ed3ebd..cee4e7c 100644 --- a/vignettes/Adding_Variables.Rmd +++ b/vignettes/Adding_Variables.Rmd @@ -17,21 +17,19 @@ knitr::opts_chunk$set( # Overview -* tidylfs is designed to be easily extended. Adding variables and summaries is a few steps: - +* `tidylfs` is designed to be easily extended. Adding variables and summaries is a few steps: * Find the relevant variables in the [ONS LFS User guidance](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/employmentandemployeetypes/methodologies/labourforcesurveyuserguidance). * Add them to the function below. * Load the function, and pass it as an argument to `lfs_compile`. - -* For example, to add maritial status: +* For example, to add marital status: ```{r} user_extra_mappings <- function(lfs_file_column_names) { custom_variables <- tibble::tribble( ~lfs_name, ~new_name, ~type, - "MARSEX6", "SEX_AND_MARITIAL_STATUS", "factor" + "MARSEX6", "SEX_AND_MARITAL_STATUS", "factor" ) return(custom_variables) @@ -52,7 +50,7 @@ user_extra_mappings <- function(lfs_file_column_names) { custom_variables <- tibble::tribble( ~lfs_name, ~new_name, ~type, - "MARSEX6", "SEX_AND_MARITIAL_STATUS", "factor", + "MARSEX6", "SEX_AND_MARITAL_STATUS", "factor", degree_class, "DEGREE_CLASS", "factor" ) diff --git a/vignettes/Replicating_ONS_Publications.Rmd b/vignettes/Replicating_ONS_Publications.Rmd index 47342a6..d8d649a 100644 --- a/vignettes/Replicating_ONS_Publications.Rmd +++ b/vignettes/Replicating_ONS_Publications.Rmd @@ -21,7 +21,7 @@ As part of the QA checks for this package there is code to replicate official ON ### EARN04 -[Ons Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsoffulltimeemployeesearn04) +[ONS Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsoffulltimeemployeesearn04) ```{r} lfs <- lfs_load() @@ -34,7 +34,7 @@ As part of the QA checks for this package there is code to replicate official ON ### EARN06 -[Ons Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsbyoccupationearn06) +[ONS Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsbyoccupationearn06) ```{r} earn06 <- lfs %>% @@ -51,7 +51,7 @@ As part of the QA checks for this package there is code to replicate official ON ### EARN07 -[Ons Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsbyindustryearn07) +[ONS Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/grossweeklyearningsbyindustryearn07) Currently only accurate from 2009 onwards @@ -91,7 +91,7 @@ Currently only accurate from 2009 onwards ### UNEM01 NSA -[Ons Publication](https://www.ons.gov.uk/employmentandlabourmarket/peoplenotinwork/unemployment/datasets/unemploymentbyageanddurationnotseasonallyadjustedunem01nsa) +[ONS Publication](https://www.ons.gov.uk/employmentandlabourmarket/peoplenotinwork/unemployment/datasets/unemploymentbyageanddurationnotseasonallyadjustedunem01nsa) Accurate from 1995 onwards, also replicates sex splits when adding `SEX` as a grouping variable. @@ -108,7 +108,7 @@ Accurate from 1995 onwards, also replicates sex splits when adding `SEX` as a gr ### HOUR01 NSA -[Ons Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/actualweeklyhoursworkednotseasonallyadjustedhour01nsa) +[ONS Publication](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/actualweeklyhoursworkednotseasonallyadjustedhour01nsa) ```{r} hour01 <- lfs %>%