-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
104 lines (78 loc) · 3.97 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# occupationcross
<!-- badges: start -->
<!-- badges: end -->
## Description
**Occupationcross** is designed to facilitate the application of crosswalks between occupational classifiers from different parts of the world.
The main function of this package is **`reclassify_to_isco08()`**. Basically, this function takes as an imput a database containing a variable associated with a national occupational classifier and performs a reclassification to [International Standard Classification of Occupations 08](https://www.ilo.org/public/english/bureau/stat/isco/isco08/) developed by International Labour Organization.
In addition, the package also has dataframes specifying the available classifications and crosswalks, as well as the tables used to make the crosswalks.
- **`available_classifications`**
- **`available_crosswalks`**
- **`crosstable_sinco2011_isco08`**
- **`crosstable_cno2001_isco08`**
## How to cite this package
You can cite this package mentioning it as "'occupationcross' R package" (Weksler y Lastra, 2022)".
To include it in references:
```
"Guido Weksler & Facundo Lastra (2022). occupationcross: Package for making crosswalks among different occupational codes. R package version https://doi.org/10.5281/zenodo.7025097"
```
bib entry:
```{bib}
@Manual{Weksler2022,
title = {occupationcross: Package for making crosswalks among different occupational codes},
author = {Guido Weksler & Facundo Lastra},
year = {2022},
doi = {10.5281/zenodo.702509},
url = {https://guidowe.github.io/occupationcross/},
}
```
## Instalation
Install the development version of occupationcross from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("Guidowe/occupationcross")
```
## Example
This is a basic example of how this package works :
Let´s load first *occupationcross*, and also *tidyverse*
```{r,warning=FALSE,message=FALSE}
library(occupationcross)
library(tidyverse)
```
The objects ```available_classifications``` and ```available_crosswalks``` show respectively which are the classifications collected and which crosswalks can be obtained applying the functions contained in this package.
```{r}
occupationcross::available_classifications
```
```{r}
occupationcross::available_crosswalks
```
Let´s use a sample database from a Mexico´s household survey (Encuesta Nacional de Ocupación y Empleo) already embedded in this package. This database contains a variable named *"p3"* corresponding to SINCO 2011 (Sistema Nacional de Clasificación de Ocupaciones - 2011) occupational codes
```{r,warning=FALSE,message=FALSE}
toy_base_mexico
```
Applying the `reclassify_to_isco08()` function we can obtain a reclassification of each case of our database into International Standard Classification of Occupations - 08 (ISCO-08) codes.
- The `classif_origin` is used to specify which classification is used in the original database.
- The `add_major_groups` parameter allows you to add a new variable identifying ISCO-08 major group.
- The `add_skill` parameter allows you to add a new variable identifying skill level of each occupation according to ISCO-08 classification of major groups.
- The `code_titles` parameter allows you to get the occupation names both from the origin classification and isco 08 classification
```{r,warning=FALSE,message=FALSE}
crossed_base <- reclassify_to_isco08(base = toy_base_mexico,
variable = p3,
classif_origin = "SINCO2011",
add_major_groups = T,
add_skill = T,
code_titles = T)
crossed_base %>%
select(p3,ISCO.08,major_group)
```