The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

SMMT: Municipality statistics

19.05.2024

The municipality inventory can also be used to learn more about how the number of municipalities evolved over time in Switzerland.

  1. To get the number of municipalities over time:

# Import the municipality inventory
mutations_object <- import_CH_municipality_inventory(file_path = path_inventory_xml)

# Specify a date vector
dates <- seq.Date(from = as.Date("1980-01-01"), to = as.Date("2020-01-01"), by = "1 year")

# Obtain the municipality count for this date vector
sy_municipality <- municipality_counter(mutations_object$mutations, dates, geo_level = "ch")

# Second example for one point in time:
sy_municipality <- municipality_counter(mutations_object$mutations, "2001-04-04", geo_level = "ch")
  1. To get the number of municipalities over time per canton:

mutations_object <- import_CH_municipality_inventory(file_path = path_inventory_xml)

dates <- seq.Date(from = as.Date("1980-01-01"), to = as.Date("2020-01-01"), by = "1 year")
sy_municipality <- municipality_counter(mutations_object$mutations, dates, geo_level = "cantons")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.