harmonize_country_code {eurostat}R Documentation

Harmonize Country Code

Description

The European Commission and the Eurostat generally uses ISO 3166-1 alpha-2 codes with two exceptions: EL (not GR) is used to represent Greece, and UK (not GB) is used to represent the United Kingdom. This function turns country codes into to ISO 3166-1 alpha-2.

Usage

harmonize_country_code(x)

Arguments

x

A character or a factor vector of eurostat countycodes.

Value

a vector.

Author(s)

Janne Huovari janne.huovari@ptt.fi

See Also

Other helpers: cut_to_classes(), dic_order(), eurotime2date(), eurotime2num(), label_eurostat()

Examples



lp <- get_eurostat("nama_10_lp_ulc")
lp$geo <- harmonize_country_code(lp$geo)



[Package eurostat version 4.0.0 Index]