track_change | R Documentation |
Track all code changes until current year or the year specified in to
argument.
The column oldCode
could have several codes if it has changed many times until
it becomes the code in newCode
. When no code change has taken place, NA
will
be used.
track_change(
type = c("fylke", "okonomisk", "kommune", "bydel", "levekaar", "grunnkrets"),
from = NULL,
to = NULL,
names = TRUE,
fix = FALSE
)
type |
Type of regional granularity ie. fylke, kommune etc. |
from |
Specify the starting year for range period. Current year is the default. |
to |
Specify the year to end the range period. Current year is used when not specified. |
names |
Include names. Default is TRUE |
fix |
Default is FALSE. When TRUE then use external codes to fix geo changes manually. The codes is sourced from config files depending on the granularity levels. |
A dataset of class data.table
consisting all older codes from
previous years until the selected year in to
argument and what these
older codes were changed into. If the codes have not changed then the value
of old code will be NA
.
mydata <- track_change("kommune", from = 2017, to = 2018)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.