Returns a tibble with congruence data of Swiss municipalities. The data indicates for each existing municipality at the start_date
to
which municipality/municipalities it corresponds at the end_date
.
Usage
congruences(
start_date = NULL,
end_date = NULL,
incl_unmodified = TRUE,
incl_territory_exchange = FALSE,
use_cache = TRUE,
max_cache_age = "1 day"
)
Arguments
- start_date
Begin of the period the data covers. A date or a character scalar in the format
"YYYY-MM-DD"
.- end_date
End of the period the data covers. A date or a character scalar in the format
"YYYY-MM-DD"
.- incl_unmodified
Include municipalities where no changes occurred in the defined period.
- incl_territory_exchange
Include information (additional rows) about territory exchanges within and between municipalities.
- use_cache
Whether or not to return cached results if possible. If
FALSE
, results are always newly fetched regardless ofmax_cache_age
.- max_cache_age
Duration after which cached results are refreshed (i.e. newly fetched). A valid lubridate duration. Use
Inf
to disable cache expiry. Only relevant ifuse_cache = TRUE
. Defaults to 1 day (24 hours).
Value
A tibble.
Examples
swissmuni::congruences(start_date = lubridate::today(),
end_date = lubridate::today(),
max_cache_age = "6 hours")
#> # A tibble: 2,131 × 12
#> InitialHistoricalCode InitialCode InitialName InitialParentHistorica…¹ InitialParentName InitialStep TerminalHistoricalCode TerminalCode TerminalName
#> <int> <int> <chr> <int> <chr> <int> <int> <int> <chr>
#> 1 10009 4122 Villnachern 10023 Bezirk Brugg NA 10009 4122 Villnachern
#> 2 10078 6158 Vionnaz 10013 District de Mont… NA 10078 6158 Vionnaz
#> 3 10157 3023 Speicher 10098 Bezirk Mittelland NA 10157 3023 Speicher
#> 4 10159 6011 Zwischbergen 10035 Bezirk Brig NA 10159 6011 Zwischbergen
#> 5 10162 2228 Villars-sur-Glâne 10104 District de la S… NA 10162 2228 Villars-sur…
#> 6 10165 2230 Villarsel-sur-Marly 10104 District de la S… NA 10165 2230 Villarsel-s…
#> 7 10242 181 Wila 10076 Bezirk Pfäffikon NA 10242 181 Wila
#> 8 10268 71 Wil (ZH) 10081 Bezirk Bülach NA 10268 71 Wil (ZH)
#> 9 10275 4045 Wettingen 10025 Bezirk Baden NA 10275 4045 Wettingen
#> 10 10277 121 Wetzikon (ZH) 10079 Bezirk Hinwil NA 10277 121 Wetzikon (Z…
#> # ℹ 2,121 more rows
#> # ℹ abbreviated name: ¹InitialParentHistoricalCode
#> # ℹ 3 more variables: TerminalParentHistoricalCode <int>, TerminalParentName <chr>, TerminalStep <int>