Closed lucazav closed 1 year ago
Technically speaking, in iso2c "AN" is "Transitionally reserved" and "IC" is "Exceptionally reserved". {countrycode}
only includes "Officially assigned" codes from iso2c because unofficial codes can be (and are) used inconsistently across various data sources. You can see the official list of codes here https://www.iso.org/obp/ui/#search/code/
To deal with data that uses unofficial codes, you can use the custom_match
argument of coutnrycode()
...
library(countrycode)
countries <- c("Canary Islands", "Netherlands Antilles")
custom_codes <- c("Canary Islands" = "IC", "Netherlands Antilles" = "AN")
countrycode(countries, "country.name", "iso2c", custom_match = custom_codes)
#> [1] "IC" "AN"
ISO2c appears to publish an "official" list of:
https://www.iso.org/obp/ui/#iso:pub:PUB500001:en
@cjyetman I keep getting requests for this, and at some point there is a "market test". Should we include categories 1, 2, 3 in the dictionary?
Many of categories 2 and 3 wouldn't apply to countrycode anyway, either because they aren't "countries" or because of 1:1 issues. It would be good to see which codes such a change would actually add.
Canary Islands (IC) and Netherlands Antilles (AN) are missing in iso2c