Skip to contents

Philippine Classification of Individual Consumption According to Purpose (PCOICOP)

Usage

get_pcoicop(
  ...,
  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 PCOICOP to retrieve. Default is NULL. If NULL, the latest version is used.

level

Character. Level of detail to retrieve. Options are "all", "divisions", "groups", "class", "sub-class", "item", and "subitem".

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 tibble containing the requested PCOICOP data.

Examples

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

# Get specific level
pcoicop_filtered <- get_pcoicop(level = "divisions")
pcoicop_filtered
#> # A tibble: 15 × 2
#>    value label                                                                  
#>    <chr> <chr>                                                                  
#>  1 01    Food and non-alcoholic beverages                                       
#>  2 02    Alcoholic beverages, tobacco and narcotics                             
#>  3 03    Clothing and footwear                                                  
#>  4 04    Housing, water, electricity, gas and other fuels                       
#>  5 05    Furnishings, household equipment and routine household maintenance     
#>  6 06    Health                                                                 
#>  7 07    Transport                                                              
#>  8 08    Information and communication                                          
#>  9 09    Recreation, sport and culture                                          
#> 10 10    Education services                                                     
#> 11 11    Restaurants and accommodation services                                 
#> 12 12    Insurance and financial services                                       
#> 13 13    Personal care, social protection and miscellaneous goods and services  
#> 14 14    Individual consumption expenditure of non-profit institutions serving …
#> 15 15    Individual consumption expenditure of general government