Description Usage Arguments Value See Also Examples
Validate your geo codes, pair them with the appropriate standard
typology, look up potential causes of invalidity in the EU correspondence
tables, and look up the appropriate geographical codes in the other
(target) typology. For example, validate geo codes in the 'NUTS2016'
typology and translate them to the now obsolete the 'NUTS2010'
typology
to join current data with historical data sets.
1 | recode_nuts(dat, geo_var = "geo", nuts_year = 2016)
|
dat |
A data frame with a 3-5 character |
geo_var |
Defaults to |
nuts_year |
The year of the NUTS typology to use.
You can select any valid
NUTS definition, i.e. |
The original data frame with a 'geo_var'
column is extended
with a 'typology'
column that states in which typology is the 'geo_var'
a valid code. For invalid codes, looks up potential reasons of invalidity
and adds them to the 'typology_change'
column, and at last it
adds a column of character vector containing the desired codes in the
target typology, for example, in the NUTS2013 typology.
Other recode functions:
get_country_code()
1 2 3 4 5 6 7 8 9 10 | {
foo <- data.frame (
geo = c("FR", "DEE32", "UKI3" ,
"HU12", "DED",
"FRK"),
values = runif(6, 0, 100 ),
stringsAsFactors = FALSE )
recode_nuts(foo, nuts_year = 2013)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.