Description Usage Arguments Details Value Examples
View source: R/donations_scrape.R
scrapes OpenSecrets political campaign contribution data. This function collects donations by specific industries to congresspeople and congressional candidates
1 | donations_scrape(inds, years, chambers = c("H", "S"), member = "Y")
|
inds |
vector of industries in string format to scrape donations from |
years |
vector of election years in string format identifying the elections to scrape data from |
chambers |
vector of chambers of Congress in string format to scrape donations to, Default: c("H", "S") |
member |
either "Y" or "N", include only donations to members of Congress or donations to members and failed candidate, Default: 'Y' |
very large requests will result in overtaxing the OpenSecrets servers and causing a HTTP 429 error, wait and rerun smaller requests when this error occurs
outputs a dataframe containing contribution data including candidate information, the amount donated, the chamber of congress, the election year, and the donating industry
1 2 3 4 5 6 | ## Not run:
if(interactive()){
donations_scrape("", "2004", "H", "N")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.