View source: R/add_variable_to_data_set.R
| add_iso3_to_data_set | R Documentation |
Derives the ISO 3166-1 alpha-3 country code from the location_code column
and adds it as a new column, modifying x in place. Currently all Norwegian
location codes map to "nor".
add_iso3_to_data_set(x)
x |
A data.table containing a column named |
x, invisibly, with a new granularity_geo column containing the
ISO 3166-1 alpha-3 country code (always "nor" for Norwegian locations).
library(data.table)
data <- data.table(location_code = c("nation_nor", "county_nor03", "blah"))
csdata::add_iso3_to_data_set(data)
print(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.