Get candidates totals aggregates
Source:R/paths-candidate.R
fec_get_candidates_totals_aggregates.Rd
Candidate total receipts and disbursements aggregated by aggregate_by
.
Usage
fec_get_candidates_totals_aggregates(
office,
sort_nulls_last,
district,
state,
min_election_cycle,
sort_hide_null,
is_active_candidate,
per_page,
max_election_cycle,
aggregate_by,
page,
election_year,
election_full,
sort_null_only,
sort,
party,
api_key = Sys.getenv("FEC_API_KEY", unset = "DEMO_KEY")
)
Arguments
- office
Federal office candidate runs for: H, S or P
- sort_nulls_last
Toggle that sorts null values last
- district
Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
- state
US state or territory where a candidate runs for office
- min_election_cycle
Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
- sort_hide_null
Hide null values on sorted column(s).
- is_active_candidate
Candidates who are actively seeking office. If no value is specified, all candidates are returned. When True is specified, only active candidates are returned. When False is specified, only inactive candidates are returned.
- per_page
The number of results returned per page. Defaults to 20.
- max_election_cycle
Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
- aggregate_by
Candidate totals aggregate_by (Chose one of dropdown options): - ' ' grouped by election year - office grouped by election year, by office - office-state grouped by election year, by office, by state - office-state-district grouped by election year, by office, by state, by district - office-party grouped by election year, by office, by party
- page
For paginating through results, starting at page 1
- election_year
Filter records to only those that were applicable to a given two-year period.The cycle begins with an odd year and is named for its ending, even year.
- election_full
True
indicates that full election period of a candidate.False
indicates that two year election cycle.- sort_null_only
Toggle that filters out all rows having sort column that is non-null
- sort
Provide a field to sort by. Use
-
for descending order. ex:-case_no
- party
Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
- api_key
An API key provided by the API provider. This key is not clearly documented in the API description. Check the API documentation for details.