checkNamesEU | R Documentation |
Check the differences between the names (or codes) given in input and the names (or codes), as provided by Eurostat, of the corresponding selected European statistical unit.
checkNamesEU(id,
unit = c("nuts0", "nuts1", "nuts2", "nuts3", "urau"),
year = c("2021","2016", "2013", "2010", "2006", "2003"),
matchWith = c("nuts", "id", "iso2", "iso3", "country_code"),
scale = c("20", "60"), return_logical = FALSE,
print = TRUE, use_internet = TRUE)
id |
character vector with names or codes | ||||||||||
unit |
the type of European statistical unit to check | ||||||||||
year |
year of the analysis | ||||||||||
matchWith |
the type of id to check:
| ||||||||||
scale |
the scale of the map. | ||||||||||
return_logical |
a logical value indicating whether nomatched id are returned. | ||||||||||
print |
a logical value indicating whether print the nomatched names | ||||||||||
use_internet |
a logical value indicating wheter the coordinates are downloaded from https://github.com/mappinguniverse/geospatial. If |
The function provides a check between id name in the dataset and the European statistical unit. unit
starts from the largest aggregate, "nuts0" (European country), to the smallest, "nuts3". Since unit can change over the years, the year of the data has to be provided.
The single unit can be coded in different ways, with names, id or iso standard.
Returns a string vector with nomatched names or a boolean vector indicating whether or not the id matched.
Alessio Serafini
checkNamesIT
, checkNamesUS
, checkNamesWR
data("popEU")
data("popEUnuts2")
# Chech only the country
ck <- checkNamesEU(id = popEU$GEO,
unit = "nuts0", matchWith = "id")
ck1 <- checkNamesEU(id = popEU$GEO, unit = "nuts0",
matchWith = "id", return_logical = TRUE,
print = FALSE)
popEU[ck1,]
ck2 <- checkNamesEU(id = popEUnuts2$GEO,
unit = "nuts2",
matchWith = "id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.