powered by
Get election info by election year and state
election_get_election_by_year_state( years = lubridate::year(lubridate::today()), state_ids = "", all = TRUE, verbose = TRUE )
A dataframe of candidates and their attributes. If a given year + state_id returns no data, that row will be filled with NAs.
year
state_id
NA
A vector of election years.
A vector of state abbreviations.
Boolean: should all possible combinations of the variables be searched for, or just the exact combination of them in the order they are supplied?
Should cases when no data is available be messaged?
if (FALSE) { election_get_election_by_year_state(years = c(2016, 2017)) }
Run the code above in your browser using DataLab