vincentarelbundock / countrycode

R package: Convert country names and country codes. Assigns region descriptors.
https://vincentarelbundock.github.io/countrycode
GNU General Public License v3.0
346 stars 84 forks source link

Vietnam and Republic of Vietnam are missing in data_vdem.csv #274

Closed fschaffner closed 3 years ago

fschaffner commented 3 years ago

Hi, thanks for creating and maintaining this package!

I noticed that the entries for Vietnam and Republic of Vietnam are missing in data_vdem.csv. The Reprex code below confirms this.

library("tidyverse")
library("vdemdata") # Can be installed with remotes::install_github("vdeminstitute/vdemdata")

# Confirm that Vietnam and Republic of Vietnam 
# are missing in data_vdem.csv
v <- read_csv("data_vdem.csv")
v %>% filter(str_detect(country, "Vietnam"))

# Get country_id for Vietnam and Republic of Vietnam
# from VDEM data
vdemdata::vdem %>% 
  filter(str_detect(country_name, "Vietnam")) %>% 
  select(country_name, country_id) %>% 
  unique()

The country code for Vietnam should be 34 and the country code for Republic of Vietnam 35.

Would you mind adding these two countries to the data_vdem.csv file? Many thanks in advance!

vincentarelbundock commented 3 years ago

Thanks a lot for the report @fschaffner , I really appreciate it.

I pushed a fix to Github. If you get a chance to try it, let me know if it works on your computer. To install:

library(remotes)
remotes::install_github("vincentarelbundock/countrycode")

Make sure you restart R completely before trying again.

fschaffner commented 3 years ago

Hi @vincentarelbundock, thanks a lot for the quick fix! It works perfectly now!

vincentarelbundock commented 3 years ago

Great! I'm working on some big features that need some testing before release to CRAN, so it might take a little while to get there