Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_independent_expenditure_office_totals

Get Independent Expenditure Office Totals


Description

HTTP Request: GET https://api.propublica.org/campaign-finance/v1/cycle/independent_expenditures/race_totals/office

Usage

get_independent_expenditure_office_totals(
  cycle = 2018,
  office = c("house", "senate", "president"),
  page = 1,
  myAPI_Key
)

Arguments

cycle

The election cycle

office

one of house, senate or president

page

Results come in batches of 20. The page parameter specifies which one to retrieve.

myAPI_Key

API key from Propublica To use the congress API, you must sign up for an API key.

Value

List of returned JSON from endpoint that retrieves he amount of money spent in independent expenditures for a given office (either House, Senate or President).

Examples

get_independent_expenditure_office_totals(2016, 'president')
get_independent_expenditure_office_totals(2016, 'house')
get_independent_expenditure_office_totals(2016, 'senate')

ProPublicaR

Access Functions for ProPublica's APIs

v1.1.1
GPL-3 | file LICENSE
Authors
Aleksander Dietrichson [aut, cre], Joselina Davit [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.