This function will download all geographical code changes from
SSB via API except enumeration areas (grunnkrets) between 1980 to
2001. The code change can be found in the dataset GrunnkretsBefore2002
.
Basically the downloaded data are those you can see directly
here, for
example if you looking for code change in municipality (kommune).
The advantage of using get_change
or
KLASS is
that you can get all code changes for several years at once.
get_change(
type = c("fylke", "kommune", "bydel", "grunnkrets"),
from = NULL,
to = NULL,
code = TRUE,
quiet = FALSE,
date = FALSE,
names = TRUE
)
A dataset of class data.table
consisting old and new code with
the respective year when the codes have changed
Type of regional granularity ie. fylke, kommune etc.
Specify the starting year for range period. Current year is the default.
Specify the year to end the range period. Current year is used when not specified.
TRUE will only track code changes. Else change name only will also be considered as change.
TRUE will suppress messages when no changes happened for a specific time range
Give complete date if TRUE else year only. Default it FALSE
Include names. Default is TRUE
DT <- get_change("kommune", from = 2018, to = 2020)
Run the code above in your browser using DataLab