View source: R/add_variable_to_data_set.R
add_granularity_geo_to_data_set | R Documentation |
Adds granularity_geo to a given data set
add_granularity_geo_to_data_set(x, location_reference = NULL)
x |
A data.table containing a column called "location_code". |
location_reference |
A location reference data.table. |
A data.table containing an extra column called "granularity_geo".
library(data.table)
data <- data.table(location_code = c("norge", "county03", "blah"))
csdata::add_granularity_geo_to_data_set(data)
print(data)
library(data.table)
data <- data.table(location_code = c("norge", "county03", "blah"))
csdata::add_granularity_geo_to_data_set(data, location_reference = csdata::nor_locations_names())
print(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.