Philippine Central Product Classification (PCPC)
Usage
get_pcpc(
...,
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 PCPC to retrieve. Default is
NULL. IfNULL, the latest version is used.- level
Character. Level of detail to retrieve. Options are
"all","sections","divisions","groups","classes","sub-classes", and"item".- harmonize
Logical. If
TRUE, formats and standardizes the returned data. Default isTRUE.- minimal
Logical. If
TRUE, returns a simplified dataset. Default isTRUE.- cols
Optional. Character vector of additional columns to include when
minimal = FALSE.
Examples
if (FALSE) { # \dontrun{
get_pcpc(token = "your_api_token")
} # }
# If token is not provided, the function will fetch from local cache or
# download the latest version from remote repo
pcpc <- get_pcpc()
# Get specific level
pcpc_filtered <- get_pcpc(level = "sections")
pcpc_filtered
#> # A tibble: 10 × 2
#> value label
#> <chr> <chr>
#> 1 0 Agriculture, forestry and fishery
#> 2 1 Ores and minerals; electricity, gas and water
#> 3 2 Food products, beverages and tobacco, textiles, apparel and leather pr…
#> 4 3 Other transportable goods, except metal products, machinery and equipm…
#> 5 4 Metal products, machinery and equipment
#> 6 5 Intangible assets; land; constructions; construction services
#> 7 6 Distributive trade services; lodging; food and beverage serving servic…
#> 8 7 Financial and related services; real estate services; and rental and l…
#> 9 8 Business and production services
#> 10 9 Community, social and personal services