Skip to content

Commit

Permalink
update site
Browse files Browse the repository at this point in the history
  • Loading branch information
djmorris1989 committed Aug 15, 2023
1 parent 8dd06af commit 4c96284
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
28 changes: 24 additions & 4 deletions public/articles/lfsclean.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ articles:
codebook: codebook.html
employment-and-underemployment: employment-and-underemployment.html
lfsclean: lfsclean.html
last_built: 2023-08-15T15:33Z
last_built: 2023-08-15T15:37Z
urls:
reference: https://stapm.gitlab.io/r-packages/lfsclean/reference
article: https://stapm.gitlab.io/r-packages/lfsclean/articles
Expand Down
21 changes: 18 additions & 3 deletions vignettes/lfsclean.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ vignette: >

The **inputs** are the raw LFS data files obtained from the [UK Data Service](https://ukdataservice.ac.uk/). __These must be the tab delimited versions of the data, not Stata or SPSS__, and all individual tab delimited files needed must be placed together in a single directory.

A typical workflow for using the package looks as follows, with the read data function for each individual year contained within a global cleaning function which applies each cleaning function in turn. The collection of global cleaning functions for each year are then wrapped in a function to combine years of data.
A typical workflow for using the package looks as follows, with the read data function for each individual year contained within a global cleaning function which applies each cleaning function in turn. The collection of global cleaning functions for each year are then wrapped in a function to combine years of data into a single data table for output.

### Quarterly cross-sectional datasets

The `lfsclean()` wrapper function is used to process multiple quarterly cross-sectional LFS data files into a single dataset of cleaned variables.

```{r workflow, message = FALSE, eval = FALSE}
#### read in and clean raw data using the package
## Load the package and other useful libraries
library(lfsclean)
library(tidyverse)
library(ggthemes)
library(zoo)
####################
## input arguments
root <- "C:/"
Expand All @@ -41,10 +47,19 @@ lfs_data <- lfsclean(root = root,
```

### Longitudinal datasets

The `lfsclean_5q()` wrapper function is used to process the raw five-quarter longitudinal data. The arguments are simular to those used for the quarterly data cleaning function. `year` in this case refers to the calendar year in which the first wave of the longitudinal data was interviewed e.g. setting year equal to 2020 would read in, clean, and combine the four longitudinal datasets which began in January-March, April-June, July-September, and October-December of 2020.

```{r workflow-long, message = FALSE, eval = FALSE}
## Load the package and other useful libraries
library(lfsclean)
library(tidyverse)
library(ggthemes)
library(zoo)
## input arguments
root <- "U:/"
Expand Down

0 comments on commit 4c96284

Please sign in to comment.