| Type: | Package |
| Title: | Philippine Statistical Classification Systems |
| Version: | 0.2.0 |
| Description: | A unified interface to access and manipulate various Philippine statistical classifications. It allows users to retrieve, filter, and harmonize classification data, making it easier to work with Philippine statistical data in R. |
| Author: | Bhas Abdulsamad |
| Maintainer: | Bhas Abdulsamad <aeabdulsamad@gmail.com> |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Imports: | cli, psgc |
| Suggests: | jsonlite, testthat (≥ 3.0.0), gt, rmarkdown, knitr, usethis |
| Config/testthat/edition: | 3 |
| RoxygenNote: | 7.3.3 |
| Depends: | R (≥ 3.5) |
| VignetteBuilder: | knitr |
| BugReports: | https://github.com/yng-me/phscs/issues |
| URL: | https://yng-me.github.io/phscs/, https://github.com/yng-me/phscs |
| NeedsCompilation: | no |
| Packaged: | 2026-05-13 14:36:03 UTC; bhasabdulsamad |
| Repository: | CRAN |
| Date/Publication: | 2026-05-13 15:10:02 UTC |
Philippine Classification of Individual Consumption According to Purpose (PCOICOP)
Description
Philippine Classification of Individual Consumption According to Purpose (PCOICOP)
Usage
get_pcoicop(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
Arguments
version |
Character. Version of the PCOICOP dataset. Default is the
latest available ( |
level |
Character. Classification level: |
minimal |
Logical. If |
cols |
Optional character vector of additional columns to include
( |
Value
A data frame of PCOICOP classifications.
References
https://psa.gov.ph/classification/pcoicop
Examples
pcoicop <- get_pcoicop()
pcoicop_divisions <- get_pcoicop(level = "divisions")
Philippine Central Product Classification (PCPC)
Description
Philippine Central Product Classification (PCPC)
Usage
get_pcpc(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
Arguments
version |
Character. Version of the PCPC dataset. Default is the
latest available ( |
level |
Character. Classification level: |
minimal |
Logical. If |
cols |
Optional character vector of additional columns to include
( |
Value
A data frame of PCPC classifications.
References
https://psa.gov.ph/classification/pcpc
Examples
pcpc <- get_pcpc()
pcpc_sections <- get_pcpc(level = "sections")
Philippine Standard Commodity Classification System (PSCCS)
Description
Philippine Standard Commodity Classification System (PSCCS)
Usage
get_psccs(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
Arguments
version |
Character. Version of the PSCCS dataset. Default is the
latest available ( |
level |
Character. Classification level: |
minimal |
Logical. If |
cols |
Optional character vector of additional columns to include
( |
Value
A data frame of PSCCS classifications.
References
https://psa.gov.ph/classification/psccs
Examples
psccs <- get_psccs()
psccs_sections <- get_psccs(level = "section")
Philippine Standard Classification of Education (PSCED)
Description
Philippine Standard Classification of Education (PSCED)
Usage
get_psced(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
Arguments
version |
Character. Version of the PSCED dataset. Default is the
latest available ( |
level |
Character. Classification level: |
minimal |
Logical. If |
cols |
Optional character vector of additional columns to include
( |
Value
A data frame of PSCED classifications.
References
https://psa.gov.ph/classification/psced
Examples
psced <- get_psced()
psced_levels <- get_psced(level = "levels")
Philippine Standard Geographic Code (PSGC)
Description
Re-exported from the psgc package. See
get_psgc for full documentation.
Usage
get_psgc(
release = latest_release(),
geographic_level = NULL,
include_population_data = FALSE
)
Arguments
release |
A release name from [list_releases()]. Defaults to [latest_release()]. |
geographic_level |
A character vector of geographic levels to filter by. Accepts canonical codes ('"Reg"', '"Prov"', '"City"', '"Mun"', '"SubMun"', '"Bgy"') as well as common aliases such as '"Region"', '"Province"', '"Municipality"', '"Barangay"', '"Sub-Municipality"', etc. Use '"city_mun"' (or aliases like '"City-Municipality"') to include both cities and municipalities. 'NULL' (default) returns all levels. |
include_population_data |
Logical. If 'TRUE', census population figures are joined onto the result, adding 'population' (integer) and 'year' columns. Each geographic unit produces one row per available census year. Defaults to 'FALSE'. |
Value
A data frame of PSGC geographic data.
References
https://psa.gov.ph/classification/psgc
Examples
psgc <- get_psgc()
psgc_regions <- get_psgc(geographic_level = "region")
Philippine Standard Industrial Classification (PSIC)
Description
Philippine Standard Industrial Classification (PSIC)
Usage
get_psic(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
Arguments
version |
Character. Version of the PSIC dataset. Default is the
latest available ( |
level |
Character. Classification level: |
minimal |
Logical. If |
cols |
Optional character vector of additional columns to include
( |
Value
A data frame of PSIC classifications.
References
https://psa.gov.ph/classification/psic
Examples
psic <- get_psic()
psic_sections <- get_psic(level = "sections")
Philippine Standard Occupational Classification (PSOC)
Description
Philippine Standard Occupational Classification (PSOC)
Usage
get_psoc(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
Arguments
version |
Character. Version of the PSOC dataset. Default is the
latest available ( |
level |
Character. Classification level: |
minimal |
Logical. If |
cols |
Optional character vector of additional columns to include
( |
Value
A data frame of PSOC classifications.
References
https://psa.gov.ph/classification/psoc
Examples
psoc <- get_psoc()
psoc_major <- get_psoc(level = "major")
Shorten region name
Description
This function shortens the region names in a PSGC data frame.
Usage
shorten_region_name(data, which = c("label", "number"), col = "area_name")
Arguments
data |
A data frame containing PSGC data. |
which |
Character. Specifies whether to shorten the region name by
label or number. Options are |
col |
Character. The name of the column containing the area names.
Default is |
Value
A data frame with the region names shortened based on the specified
which argument.
Examples
regions <- get_psgc(geographic_level = "region")
shorten_region_name(regions)
shorten_region_name(regions, which = "number")