get_country_code: Get Country Code Of Regions

Description Usage Arguments Value See Also Examples

View source: R/get_country_code.R

Description

The function identifies the sub-national geographical identifiers from known typologies and returns the ISO 3166-1 alpha-2 country codes.

Usage

1
get_country_code(geo, typology = "NUTS")

Arguments

geo

A character variable with geo codes.

typology

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.

Value

The ISO 3166-1 alpha-2 codes of the countries as a character vector.

See Also

Other recode functions: recode_nuts()

Examples

1
2
3
{
get_country_code (c("EL", "GR", "DED", "HU102"))
}

Example output

[1] "GR" "GR" "DE" "HU"

regions documentation built on June 21, 2021, 5:06 p.m.