You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am combining the functions add_nuts_level() and label_eurostat() but somehow the functions interfere.
For example, this works fine, resulting in a correct nuts_level column:
df <- get_eurostat("agr_r_accts") %>%
add_nuts_level(geo_labels = "geo")
But when I run this:
df2 <- df %>%
label_eurostat(code = "geo", fix_duplicated = TRUE)
I get the message:
Warning message:
In label_eurostat(y[[i]], i, eu_order = eu_order, lang = lang, countrycode = countrycode, :
All labels for nuts_level were not found.
and the nuts_level column gets mixed up.
I also tried a different order, not keeping the code columns, different datasets, etc but somehow the label_eurostat() function wants to identidy the nuts level as well, which fails, perhaps because there are duplicated labels?
The text was updated successfully, but these errors were encountered:
I think that we should connect this to the regions package, and make a vignette about working with subnational statistics. The duplication comes from the problem that the regions package solves: often in the same dataset the same geo is present with two different definitions. This is a bug on Eurostat's side, not on the eurostat packages.
These functions will be deprecated as a new package grew out of them, which is already on CRAN under the name regions. On the devel branch there is a new tutorial, and the functions give a message or warning, and when appropriate, call the regions function instead.
@antagomir , @michielvandijk , I think that this issue can be closed as soon as the devel branch is merged to the master.
I am combining the functions add_nuts_level() and label_eurostat() but somehow the functions interfere.
For example, this works fine, resulting in a correct nuts_level column:
df <- get_eurostat("agr_r_accts") %>%
add_nuts_level(geo_labels = "geo")
But when I run this:
df2 <- df %>%
label_eurostat(code = "geo", fix_duplicated = TRUE)
I get the message:
Warning message:
In label_eurostat(y[[i]], i, eu_order = eu_order, lang = lang, countrycode = countrycode, :
All labels for nuts_level were not found.
and the nuts_level column gets mixed up.
I also tried a different order, not keeping the code columns, different datasets, etc but somehow the label_eurostat() function wants to identidy the nuts level as well, which fails, perhaps because there are duplicated labels?
The text was updated successfully, but these errors were encountered: