Skip to contents

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

if (FALSE) { # \dontrun{
# Source data with enumeration area codes ie. grunnkrets
dt <- make_file("BEFOLKNING", aggregate = FALSE)
} # }