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 83 forks source link

Taiwan numeric code is missing where it should be 158? #283

Closed iago-pssjd closed 3 years ago

iago-pssjd commented 3 years ago

Hi!,

Thanks for the great package.

codelist$un[codelist$country.name.en == "Taiwan"] is missing, but it seems to have numeric code 158 (https://www.iso.org/obp/ui/#iso:code:3166:TW)

cjyetman commented 3 years ago

UN's M49 does not include Taiwan, but IS0-3166 does.

https://unstats.un.org/unsd/methodology/m49/overview/

countrycode("Taiwan", "country.name", "un")
# [1] NA

https://www.iso.org/obp/ui/#iso:code:3166:TW

countrycode("Taiwan", "country.name", "iso3n")
# [1] 158
iago-pssjd commented 3 years ago

Thanks! I see.