Skip to contents

Function that translates a vector of ISCO-88 occupation codes into a vector of labels

Usage

describe_occupation(isco_codes, sex = NULL, plot = NULL)

Arguments

isco_codes

A numeric vector of ISCO-88 occupation codes (major, submajor, minor, or unit)

sex

A vector with the respective sex for isco_codes vector. The default value is NULL

plot

A type of plot between treemap and circular packing. The default value is NULL

Value

A string vector of ISCO-88 labels

Examples

demog_data <- data.frame(
  occupation_label =
    c(6111, 3221, 5113, 5133, 6111, 23, 25),
  sex = c("F", "M", "F", "F", "M", "M", "F")
)
describe_occupation(
  isco_codes = demog_data$occupation_label,
  sex = demog_data$sex, plot = "treemap"
)
#> 1 codes are invalid.

#> $data
#>   major                                        major_label sub_major
#> 1     5 Service Workers and Shop and Market Sales Workers         51
#> 2     5 Service Workers and Shop and Market Sales Workers         51
#> 3     6          Skilled Agricultural and Fishery Workers         61
#> 4     2                                     Professionals         23
#> 5     3           Technicians and Associate Professionals         32
#> 6     6          Skilled Agricultural and Fishery Workers         61
#> 7    NA                                               <NA>        NA
#>                                             sub_major_label minor
#> 1                 Personal and Protective Services Workers    511
#> 2                 Personal and Protective Services Workers    513
#> 3 Market-Oriented Skilled Agricultural and Fishery Workers    611
#> 4                                   Teaching Professionals     NA
#> 5          Life Science and Health Associate Professionals    322
#> 6 Market-Oriented Skilled Agricultural and Fishery Workers    611
#> 7                                                      <NA>    NA
#>                                               minor_label unit
#> 1                  Travel Attendants and Related Workers  5113
#> 2                      Personal Care and Related Workers  5133
#> 3                      Market Gardeners and Crop Growers  6111
#> 4                                                    <NA>   NA
#> 5 Modern Health Associate Professionals (Except Nursing)  3221
#> 6                      Market Gardeners and Crop Growers  6111
#> 7                                                    <NA>   NA
#>                          unit_label  sex count
#> 1                    Travel guides     F     1
#> 2 Home-based personal care workers     F     1
#> 3 Field crop and vegetable growers     F     1
#> 4                              <NA>    M     1
#> 5               Medical assistants     M     1
#> 6 Field crop and vegetable growers     M     1
#> 7                              <NA> <NA>     1
#> 
#> $plot

#>