Convert Vietnam Provincial Codes

Converts Vietnam's provinces' names and ID across different formats. Handles diacritics and different spellings.

Build Status codecov CRAN

Use the main function vietnamcode to convert Vietnam's provinces' names and ID across different formats. The function can handle diacritics and various spellings.

source <- "HCMC"
vietnamcode::vietnamcode(source, "province_name", "province_name")
vietnamcode::vietnamcode(source, "province_name", "pci")
vietnamcode::vietnamcode(source, "province_name", "enterprise_census")


install.packages("vietnamcode") # Or


vietnamcode 0.1.1

Use custom function utils/convert_unicode_to_ascii instead of relying on iconv(s, to="ASCII//TRANSLIT"). The package is now portable across OSes, especially Windows.

vietnamcode 0.1.0

First release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.1 by Anh Le, 5 years ago

Browse source code at

Authors: Anh Le [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Suggests testthat

See at CRAN