sf_get_reg_keytable: Get regional classification table from Statistics Finland

View source: R/sf_get_classifications.R

sf_get_reg_keytableR Documentation

Get regional classification table from Statistics Finland

Description

Get regional classification table for municipalities from Statistics Finland. Table includes all municipality based regional classifications in Finland. Classifications include Finnish, Swedish and English versions. The table is from

Usage

sf_get_reg_keytable(
  classes = NULL,
  url =
    "http://www.tilastokeskus.fi/static/media/uploads/meta/luokitukset/kooste_2016_kaikki_kielet.xlsx",
  as_factors = default.stringsAsFactors()
)

Arguments

classes

a name or vector of names of the regional classification. NULL (default) return all classifications. Names can be names in orginal table or valid names given by make_names.

url

a url of the table.

as_factors

a logical. Should columns be converted to factors. The default is from options("stringsAsFactors").

Value

a tibble with columns Knro (classification number of a municipality), Kunta (a name of a municipality) and colums for a code and a name of the classes classification.

Examples

  key_table <- sf_get_reg_keytable()
  key_table_mk <- sf_get_reg_keytable("Maakunta")
  key_table_mk_sk <- sf_get_reg_keytable(c("Maakunta", "Seutukunta"))
  key_table_mk_sk <- sf_get_reg_keytable(c("Maakunta", "Region"))

pttry/statfitools documentation built on Feb. 2, 2025, 1:50 a.m.