Title: | Convert Vietnam Provincial Codes |
---|---|
Description: | Converts Vietnam's provinces' names and ID across different formats. Handles diacritics and different spellings. |
Authors: | Anh Le [aut, cre] |
Maintainer: | Anh Le <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2024-12-01 08:50:08 UTC |
Source: | CRAN |
Converts Vietnam's provinces' names and ID across different formats. Handles diacritics and different spellings.
vietnamcode(sourcevar, origin = c("province_name", "enterprise_census", "enterprise_census_old", "enterprise_census_c", "pci"), destination = c("province_name", "province_name_diacritics", "enterprise_census", "enterprise_census_old", "enterprise_census_c", "pci"))
vietnamcode(sourcevar, origin = c("province_name", "enterprise_census", "enterprise_census_old", "enterprise_census_c", "pci"), destination = c("province_name", "province_name_diacritics", "enterprise_census", "enterprise_census_old", "enterprise_census_c", "pci"))
sourcevar |
Character vector that contains the codes or province names to be converted |
origin |
String that indicates the coding scheme of origin |
destination |
String that indicates the coding scheme of destination |
Supports the following coding schemes:
province_name
province_name_diacritics
enterprise_censusm enterprise_census_old, enterprise_census_c: the same as GSO code
pci: Provincial Competitiveness Index
codes.of.origin <- vietnamcode::vietnamcode_data$province_name # Vector of values to be converted vietnamcode(codes.of.origin, "province_name", "pci")
codes.of.origin <- vietnamcode::vietnamcode_data$province_name # Vector of values to be converted vietnamcode(codes.of.origin, "province_name", "pci")
Vietnam provinces ID
vietnamcode_data
vietnamcode_data
A data frame
province_nameprovince name
province_nameprovince name with diacritics
pciused by the Provincial Competitiveness Index
enterprise_censusused by the General Statistics Office (GSO) for the Enterprise Census
enterprise_census_oldold GSO code
enterprise_census_cGSO code as character
regexRegular Expression to match different spellings