View source: R/get_independent_expenditure_office_totals.R
get_independent_expenditure_office_totals | R Documentation |
HTTP Request: GET https://api.propublica.org/campaign-finance/v1/cycle/independent_expenditures/race_totals/office
get_independent_expenditure_office_totals(
cycle = 2018,
office = c("house", "senate", "president"),
page = 1,
myAPI_Key
)
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. |
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).
## Not run:
get_independent_expenditure_office_totals(2016, 'president')
get_independent_expenditure_office_totals(2016, 'house')
get_independent_expenditure_office_totals(2016, 'senate')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.