Skip to contents

Mutation list describes all changes related to municipalities that occurred during the specified period.

Usage

get_mutations(
  start_period = Sys.Date(),
  end_period = Sys.Date(),
  escape_chars = NULL,
  include_territory_exchange = NULL,
  name_repair = "unique"
)

Arguments

start_period

Start of requested period

end_period

End of requested period

escape_chars

Defines forbidden characters in the response and their respective escape characters. For example, with the value "/( ).(_)", all slashes in the response will be replaced with a space while periods are replaced with underscore.

include_territory_exchange

Include/exclude records that only concern territory changes.

name_repair

read_csv is used internally and ensures column names are "unique" using the "name_repeir" argument.

Value

a data.frame/tibble

Examples

# \donttest{
get_mutations(start_period = "2024-01-01", end_period = "2024-08-01")
#> # A tibble: 14 × 14
#>    MutationNumber MutationDate InitialHistoricalCode InitialCode InitialName    
#>             <dbl> <chr>                        <dbl>       <dbl> <chr>          
#>  1           3983 01.01.2024                   15266         767 Reutigen       
#>  2           3983 01.01.2024                   15344         947 Zwieselberg    
#>  3           3984 01.01.2024                   15375         992 Wangen an der …
#>  4           3984 01.01.2024                   15376         993 Wangenried     
#>  5           3985 01.01.2024                   14067        2456 Lüterswil-Gäch…
#>  6           3985 01.01.2024                   15642        2465 Buchegg        
#>  7           3986 01.01.2024                   13320        6773 Beurnevésin    
#>  8           3986 01.01.2024                   13322        6775 Bonfol         
#>  9           3987 01.01.2024                   10886        4042 Turgi          
#> 10           3987 01.01.2024                   13189        4021 Baden          
#> 11           3988 01.03.2024                   12547          64 Nürensdorf     
#> 12           3988 01.03.2024                   12547          64 Nürensdorf     
#> 13           3988 01.03.2024                   12673          62 Kloten         
#> 14           3988 01.03.2024                   12673          62 Kloten         
#> # ℹ 9 more variables: InitialParentHistoricalCode <dbl>,
#> #   InitialParentName <chr>, InitialStep <dbl>, TerminalHistoricalCode <dbl>,
#> #   TerminalCode <dbl>, TerminalName <chr>, TerminalParentHistoricalCode <dbl>,
#> #   TerminalParentName <chr>, TerminalStep <dbl>
# }