Returns a list with a metadata item per ballot date, political level and optionally election procedure and number.
Usage
combos_elections(
ballot_dates = all_ballot_dates,
lvls = all_lvls,
cantons = all_cantons,
prcds = all_prcds,
incl_prcd = TRUE,
incl_nr = incl_prcd
)
Arguments
- ballot_dates
FOKUS-covered ballot date(s). One or more of
"2018-09-23"
"2018-11-25"
"2019-10-20"
"2020-09-27"
"2020-10-18"
"2021-11-28"
"2023-06-18"
"2024-10-20"
- lvls
Political level(s). One or more of
"cantonal"
and"federal"
.- cantons
FOKUS-covered canton name(s). One or more of
"aargau"
- prcds
Election procedure(s). One or more of
"proportional"
and"majoritarian"
.- incl_prcd
Whether or not to include election procedures in the resulting list. Setting this to
FALSE
potentially results in fewer combinations.- incl_nr
Whether or not to include election numbers in the resulting list. Setting this to
FALSE
potentially results in fewer combinations. Only relevant ifincl_prcd = TRUE
.
Value
A list with an element per political-level and optionally -election-procedure and -election-number combination.
See also
Other combination functions:
add_vars_to_combos()
,
combos_ballot_types()
,
combos_proposal_arguments()
,
combos_proposal_main_motives()
,
combos_proposals()
Other election predicate functions:
election_candidates()
,
election_name()
,
election_names_combined()
,
election_parties()
,
election_tickets()
,
n_election_candidates()
,
n_election_seats()
,
past_election_date()
,
requires_candidate_registration()
Examples
fokus::combos_elections(ballot_dates = "2019-10-20",
cantons = "aargau")
#> [[1]]
#> [[1]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[1]]$lvl
#> [1] "cantonal"
#>
#> [[1]]$canton
#> [1] "aargau"
#>
#> [[1]]$prcd
#> [1] "majoritarian"
#>
#> [[1]]$election_nr
#> [1] 1
#>
#>
#> [[2]]
#> [[2]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[2]]$lvl
#> [1] "federal"
#>
#> [[2]]$canton
#> [1] "aargau"
#>
#> [[2]]$prcd
#> [1] "majoritarian"
#>
#> [[2]]$election_nr
#> [1] 1
#>
#>
#> [[3]]
#> [[3]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[3]]$lvl
#> [1] "federal"
#>
#> [[3]]$canton
#> [1] "aargau"
#>
#> [[3]]$prcd
#> [1] "proportional"
#>
#> [[3]]$election_nr
#> [1] 1
#>
#>
# without election numbers
fokus::combos_elections(ballot_dates = "2019-10-20",
cantons = "aargau",
incl_prcd = TRUE,
incl_nr = FALSE)
#> [[1]]
#> [[1]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[1]]$lvl
#> [1] "cantonal"
#>
#> [[1]]$canton
#> [1] "aargau"
#>
#> [[1]]$prcd
#> [1] "majoritarian"
#>
#>
#> [[2]]
#> [[2]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[2]]$lvl
#> [1] "federal"
#>
#> [[2]]$canton
#> [1] "aargau"
#>
#> [[2]]$prcd
#> [1] "majoritarian"
#>
#>
#> [[3]]
#> [[3]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[3]]$lvl
#> [1] "federal"
#>
#> [[3]]$canton
#> [1] "aargau"
#>
#> [[3]]$prcd
#> [1] "proportional"
#>
#>
# without election procedures and numbers
fokus::combos_elections(ballot_dates = "2019-10-20",
cantons = "aargau",
incl_prcd = FALSE,
incl_nr = FALSE)
#> [[1]]
#> [[1]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[1]]$lvl
#> [1] "cantonal"
#>
#> [[1]]$canton
#> [1] "aargau"
#>
#>
#> [[2]]
#> [[2]]$ballot_date
#> [1] "2019-10-20"
#>
#> [[2]]$lvl
#> [1] "federal"
#>
#> [[2]]$canton
#> [1] "aargau"
#>
#>