download_municipality_inventory(path = getwd()) path_inventory_xml <-
import_CH_municipality_inventory(file_path = path_inventory_xml)
mutations_object <- mutations_object$mutations
mutations <-
# Alternative: Use a local available version (e.g. Version from January 1st, 2018):
"path/to/eCH0071_180101.xml"
file_path_inventory_xml <- import_CH_municipality_inventory(file_path = file_path_inventory_xml)
mutations_object <- mutations_object$mutations mutations <-
as.POSIXct("1961-01-01")
old_state <- as.POSIXct("1963-01-01") new_state <-
map_old_to_new_state(mutations, old_state, new_state)
mapping_object <- mapping_object$mapped mapping_table <-
Excerpt of mapping table:
bfs_nr_new | name_new | bfs_nr_old | name_old |
---|---|---|---|
4021 | Baden | 4021 | Baden |
4021 | Baden | 4025 | Daettwil |
If of relevance, use the information about municipalities which could not be mapped (e.g. due to secessions). For example, if you need to exclude these elements from a dataset.