Skip to contents

Philippine Standard Industrial Classification (PSIC)

Usage

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

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 PSIC dataset. Default is NULL. If NULL, the latest version is used.

level

Character. Classification level such as "all", "sections", "divisions", "groups", "classes", and "sub-classes".

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.

Value

A data frame of PSIC classifications.

Examples

if (FALSE) { # \dontrun{
get_psic(token = "your_api_token")
} # }
# If token is not provided, the function will fetch from local cache or
# download the latest version from remote repo
psic <- get_psic()

# Get specific level
psic_filtered <- get_psic(level = "sections")
psic_filtered
#> # A tibble: 21 × 2
#>    value label                                                               
#>    <chr> <chr>                                                               
#>  1 A     Agriculture, forestry and fishing                                   
#>  2 B     Mining and quarrying                                                
#>  3 C     Manufacturing                                                       
#>  4 D     Electricity, gas, steam and air conditioning supply                 
#>  5 E     Water supply; sewerage, waste management                            
#>  6 F     Construction                                                        
#>  7 G     Wholesale and retail trade; repair of motor vehicles and motorcycles
#>  8 H     Transportation and storage                                          
#>  9 I     Accommodation and food service activities                           
#> 10 J     Information and communication                                       
#> # ℹ 11 more rows