| Title: | Philippine Statistical Classification Systems |
|---|---|
| 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. |
| Authors: | Bhas Abdulsamad [aut, cre, cph]
|
| Maintainer: | Bhas Abdulsamad <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0 |
| Built: | 2026-11-17 06:06:39 UTC |
| Source: | https://github.com/yng-me/phscs |
Philippine Classification of Individual Consumption According to Purpose (PCOICOP)
get_pcoicop(version = NULL, level = NULL, minimal = TRUE, cols = NULL)get_pcoicop(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
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
( |
A data frame of PCOICOP classifications.
https://psa.gov.ph/classification/pcoicop
pcoicop <- get_pcoicop() pcoicop_divisions <- get_pcoicop(level = "divisions")pcoicop <- get_pcoicop() pcoicop_divisions <- get_pcoicop(level = "divisions")
Philippine Central Product Classification (PCPC)
get_pcpc(version = NULL, level = NULL, minimal = TRUE, cols = NULL)get_pcpc(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
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
( |
A data frame of PCPC classifications.
https://psa.gov.ph/classification/pcpc
pcpc <- get_pcpc() pcpc_sections <- get_pcpc(level = "sections")pcpc <- get_pcpc() pcpc_sections <- get_pcpc(level = "sections")
Philippine Standard Commodity Classification System (PSCCS)
get_psccs(version = NULL, level = NULL, minimal = TRUE, cols = NULL)get_psccs(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
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
( |
A data frame of PSCCS classifications.
https://psa.gov.ph/classification/psccs
psccs <- get_psccs() psccs_sections <- get_psccs(level = "section")psccs <- get_psccs() psccs_sections <- get_psccs(level = "section")
Philippine Standard Classification of Education (PSCED)
get_psced(version = NULL, level = NULL, minimal = TRUE, cols = NULL)get_psced(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
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
( |
A data frame of PSCED classifications. When included (minimal = FALSE
or cols = "level"), level is the education level code
("0" early childhood to "8" doctoral), not the hierarchy depth.
https://psa.gov.ph/classification/psced
psced <- get_psced() psced_levels <- get_psced(level = "levels")psced <- get_psced() psced_levels <- get_psced(level = "levels")
Re-exported from the psgc package. See
get_psgc for full documentation.
get_psgc( release = latest_release(), geographic_level = NULL, include_population_data = FALSE )get_psgc( release = latest_release(), geographic_level = NULL, include_population_data = FALSE )
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'. |
A data frame of PSGC geographic data.
https://psa.gov.ph/classification/psgc
psgc <- get_psgc() psgc_regions <- get_psgc(geographic_level = "region")psgc <- get_psgc() psgc_regions <- get_psgc(geographic_level = "region")
Philippine Standard Industrial Classification (PSIC)
get_psic(version = NULL, level = NULL, minimal = TRUE, cols = NULL)get_psic(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
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
( |
A data frame of PSIC classifications.
https://psa.gov.ph/classification/psic
psic <- get_psic() psic_sections <- get_psic(level = "sections")psic <- get_psic() psic_sections <- get_psic(level = "sections")
Philippine Standard Occupational Classification (PSOC)
get_psoc(version = NULL, level = NULL, minimal = TRUE, cols = NULL)get_psoc(version = NULL, level = NULL, minimal = TRUE, cols = NULL)
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
( |
A data frame of PSOC classifications.
https://psa.gov.ph/classification/psoc
psoc <- get_psoc() psoc_major <- get_psoc(level = "major")psoc <- get_psoc() psoc_major <- get_psoc(level = "major")
Returns a PTSCS list with columns id, category_id,
description (the category name) and keywords.
get_ptscs(type = c("industries", "products"))get_ptscs(type = c("industries", "products"))
type |
Character. Which list to return: |
A data frame of PTSCS classifications. For industries,
keywords is a list column of the comma-separated keywords; for
products, it is the original “Includes ...” text, unchanged.
https://psa.gov.ph/classification/ptsc
ptscs <- get_ptscs() ptscs_products <- get_ptscs(type = "products")ptscs <- get_ptscs() ptscs_products <- get_ptscs(type = "products")
This function shortens the region names in a PSGC data frame.
shorten_region_name(data, which = c("label", "number"), col = "area_name")shorten_region_name(data, which = c("label", "number"), col = "area_name")
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 |
A data frame with the region names shortened based on the specified
which argument.
regions <- get_psgc(geographic_level = "region") shorten_region_name(regions) shorten_region_name(regions, which = "number")regions <- get_psgc(geographic_level = "region") shorten_region_name(regions) shorten_region_name(regions, which = "number")