combos_elections: Get election combinations

combos_electionsR Documentation

Get election combinations

Description

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 if incl_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")

# without election numbers
fokus::combos_elections(ballot_dates = "2019-10-20",
                        cantons = "aargau",
                        incl_prcd = TRUE,
                        incl_nr = FALSE)

# without election procedures and numbers
fokus::combos_elections(ballot_dates = "2019-10-20",
                        cantons = "aargau",
                        incl_prcd = FALSE,
                        incl_nr = FALSE)

zdaarau/fokus documentation built on Dec. 24, 2024, 10:47 p.m.