View source: R/candidates_get_by_office_state.R
candidates_get_by_office_state | R Documentation |
Get candidates by the state in which they hold office
candidates_get_by_office_state(
state_ids = NA,
office_ids,
election_years = lubridate::year(lubridate::today()),
all = TRUE,
verbose = TRUE
)
state_ids |
Optional: vector of state abbreviations. Default is |
office_ids |
Required: vector of office ids that candidates hold. See |
election_years |
Optional: vector of election years in which the candidate held office. Default is the current year. |
all |
Boolean: should all possible combinations of the variables be searched for, or just the exact combination of them in the order they are supplied? |
verbose |
Should cases when no data is available be messaged? |
A dataframe of candidates and their attributes. If a given state_id
+ office_id
+ election_year
combination returns no data, that row will be filled with NA
s.
## Not run:
candidates_get_by_office_state(
state_ids = c(NA, "NY", "CA"),
office_ids = c("1", "6"),
verbose = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.