Learn R Programming

ProPublicaR (version 1.1.4)

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
)

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).

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.

Examples

Run this code
if (FALSE) {
get_independent_expenditure_office_totals(2016, 'president')
get_independent_expenditure_office_totals(2016, 'house')
get_independent_expenditure_office_totals(2016, 'senate')
}

Run the code above in your browser using DataLab