This is a simple guide to access data via API. Regional granularity levels includes:
All functions that have
get_ prefix access data directly
API. This is the simple guide to use norgeo API function to
get codes for municipalities with selected time period:
library(norgeo) dt <- get_code("kommune", from = 2015, to = 2021) # only current geo code dt <- get_code("kommune", from = 2021)
You could download geo code changes via
function. The example below will download municipalities codes that have
changed from 2015 to 2021.
To track all municipalities codes that have changed since 2015 to their current codes as in 2021 can be done as follows:
The difference between
track_change() is that, the former will only download codes
that have changed while the latter will, in addition, track these
changes to the current codes.
You can also track geo codes that are split or
merged to a new geo with function