View source: R/get_region_classifications.R
get_regionkey | R Documentation |
Imports region classification keys from Statistics Finland API. A wrapper for
get_key()
that it calls under the hood.
get_regionkey(
...,
year = NULL,
only_codes = FALSE,
only_names = FALSE,
lang = "fi",
offline = TRUE
)
... |
character(s), the regions to include in the key. |
year |
character or numerical, the year of the desired classification key. |
only_codes |
logical, whether the key should contain only the region codes.
Defaults to |
only_names |
logical, whether the key should contain only the region names.
Defaults to |
lang |
|
offline |
logical, whether uses the key in the package data. Defaults |
The classification keys e.g. from seutukunta to maakunta or maakunta to suuralue are not very well
available. Thus, the logic of the function is to first get all keys from kunta to all other regions,
construct a table that contains all municipalities with their corresponding larger regions and
then apply the selection implied by the arguments set by the user possible removing duplicates.
get_regionkey()
can thus also construct keys that are not available in the Statistics
Finland classification keys API.
Region classification key as a data.frame.
get_regionkey()
get_regionkey("kunta", "seutukunta", only_codes = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.