Learn R Programming

phscs (version 0.1.0)

get_psoc: Philippine Standard Occupational Classification (PSOC)

Description

Philippine Standard Occupational Classification (PSOC)

Usage

get_psoc(
  ...,
  token = NULL,
  version = NULL,
  level = NULL,
  harmonize = TRUE,
  minimal = TRUE,
  cols = NULL
)

Value

A data frame of PSOC classifications.

Arguments

...

See ?dplyr::filter. Expressions that return a logical value, and are defined in terms of the variables in returned data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept.

token

Character. API access token.

version

Character. Version of the PSOC dataset. Default is NULL. If NULL, the latest version is used.

level

Character. Classification level such as "all", "major", "sub-major", "minor", and "unit".

harmonize

Logical. If TRUE, formats and standardizes the returned data. Default is TRUE.

minimal

Logical. If TRUE, returns a simplified dataset. Default is TRUE.

cols

Optional. Character vector of additional columns to include when minimal = FALSE.

References

https://psa.gov.ph/classification/psoc

Examples

Run this code
if (FALSE) {
get_psoc(token = "your_api_token")
}
# If token is not provided, the function will fetch from local cache or
# download the latest version from remote repo
psoc <- get_psoc()

# Get specific level
psoc_filtered <- get_psoc(level = "major")
psoc_filtered

Run the code above in your browser using DataLab