vincentarelbundock / countrycode

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

Taiwan missing? #350

Closed carlaperezmon closed 10 months ago

carlaperezmon commented 10 months ago

Hi Vincent,

Would it be possible to add Taiwan in the list of countries you can search for by country.names?

Thanks,

Carla

vincentarelbundock commented 10 months ago

countrycode can already detect and convert “Taiwan” to a code. However, not every organization includes a unique code for Taiwan. You should check with the original source of the country code you are interested in. If it is missing from countrycode but present in the original source, please open a new issue by mentioning both the name of the missing code type and the source where you saw a value for Taiwan.

In this example, we see that ISO does define a numeric and a character code:

library(countrycode)
countrycode("Taiwan", "country.name", "iso3n")
# [1] 158

countrycode("Taiwan", "country.name", "iso3c")
# [1] "TWN"