Skip to contents

Communication cost aggregated by candidate ID and committee ID.

Usage

fec_get_communication_costs_by_candidate(
  office,
  candidate_id,
  cycle,
  district,
  state,
  page,
  support_oppose,
  election_full,
  sort_hide_null,
  sort_nulls_last,
  sort_null_only,
  per_page,
  sort,
  api_key = Sys.getenv("FEC_API_KEY", unset = "DEMO_KEY")
)

Arguments

office

Federal office candidate runs for: H, S or P

candidate_id

A unique identifier assigned to each candidate registered with the FEC. If a person runs for several offices, that person will have separate candidate IDs for each office.

cycle

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.

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

page

For paginating through results, starting at page 1

support_oppose

Support or opposition

election_full

True indicates that full election period of a candidate. False indicates that two year election cycle.

sort_hide_null

Hide null values on sorted column(s).

sort_nulls_last

Toggle that sorts null values last

sort_null_only

Toggle that filters out all rows having sort column that is non-null

per_page

The number of results returned per page. Defaults to 20.

sort

Provide a field to sort by. Use - for descending order.

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.

Value

BKTODO: Return descriptions are not yet implemented in beekeeper