do_recode_without_aggregate: Recode Geo Code Without Aggregate

View source: R/norgeo-recode.R

do_recode_without_aggregateR Documentation

Recode Geo Code Without Aggregate

Description

Recode geo code without aggregating the data. The input in argument source must be a lower granularity level than the level input.

Usage

do_recode_without_aggregate(
  dt = NULL,
  source = c("grunnkrets", "fylke", "kommune", "bydel"),
  year = NULL,
  base = NULL,
  ...
)

Arguments

dt

Input data preferrably in a data.table format but is not mandatory

source

What geographical granularity codes that is available in the source data. This will be used for merging with the output from geo_map()

year

Which year the geograhical codes to be recoded to. If it is empty then global option for orgdata.year will be used.

base

Logical value. If TRUE then use year in the original data as the base year to recode the geographical codes. Default is FALSE and use all available codes in geo codebook

...

Any additional arguments

See Also

Other geo recode functions: do_geo_recode(), get_geo_recode()

Examples

## Not run: 
# Source data with enumeration area codes ie. grunnkrets
dt <- make_file("BEFOLKNING", aggregate = FALSE)

## End(Not run)

helseprofil/orgdata documentation built on Feb. 3, 2025, 4:55 p.m.