get_code: Get the codes of geographical levels

View source: R/get-code.R

get_codeR Documentation

Get the codes of geographical levels

Description

This function will download the codes of selected geographical levels via API.

Usage

get_code(
  type = c("fylke", "okonomisk", "kommune", "bydel", "levekaar", "grunnkrets"),
  from = NULL,
  to = NULL,
  date = FALSE,
  names = TRUE
)

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.

date

Give complete date if TRUE else year only. Default it FALSE

names

Include names. Default is TRUE

Value

A dataset of class data.table consisting codes of selected geographical level and the duration the codes are valid ie. from and to.

Examples

mydata <- get_code("kommune", from = 2017, to = 2019)

helseprofil/norgeo documentation built on Oct. 20, 2024, 1:26 p.m.