Let’s use the SMMT package and the municipality inventory data to analyse the number of mutations.
By now, we know that municipalities change frequently in Switzerland. To get a better grasp, how often mutations occur, we can analyse the yearly frequency of these changes.
<- seq.Date(as.Date("1960-01-01"), to = as.Date("2022-01-01"), by = "1 year")
start_date
<- mutation_count(mutations = mutations_object$mutations,
res + lubridate::years(1),
start_date, start_date territorial_changes_only = FALSE)
<- ggplot(data = res, aes(start_date, number_of_mutations_in_period)) + geom_bar(stat = "identity")
p print(p)
This calculation also includes the administrative changes as well. Mutations that had a territorial effect can be calculated as follows:
<- territorial_mutation_count(mutations = mutations_object$mutations,
res + lubridate::years(1))
start_date, start_date
<- ggplot(data = res, aes(start_date, number_of_mutations_in_period)) + geom_bar(stat = "identity")
p print(p)