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.
Usage
track_change(
type = c("fylke", "okonomisk", "kommune", "bydel", "levekaar", "grunnkrets"),
from = NULL,
to = NULL,
names = TRUE,
fix = FALSE
)
Arguments
- 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.