The function identifies the sub-national geographical identifiers from known typologies and returns the ISO 3166-1 alpha-2 country codes.
get_country_code(geo, typology = "NUTS")A character variable with geo codes.
Currently the following typologies are supported:
"NUTS1", "NUTS2", "NUTS3" or "NUTS" for any of
the NUTS typologies. The technical typology "NUTS0"
can be used to translate Eurostat country codes to ISO 3166-1 alpha-2
country codes.
The ISO 3166-1 alpha-2 codes of the countries as a character vector.
Other recode functions:
recode_nuts()
{
get_country_code (c("EL", "GR", "DED", "HU102"))
}
#> [1] "GR" "GR" "DE" "HU"