track_change: Track all changes for codes from API
Description
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", "kommune", "bydel", "grunnkrets"),
from = NULL,
to = NULL,
names = TRUE
)
Value
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.
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.