forked from Data4Democracy/house_expenditures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.R
14 lines (12 loc) · 1.1 KB
/
load.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Download and read Q3 detail files
file_downloads <- c("https://pp-projects-static.s3.amazonaws.com/congress/staffers/2016Q3-house-disburse-detail.csv",
"https://pp-projects-static.s3.amazonaws.com/congress/staffers/2015Q3-house-disburse-detail.csv",
"https://pp-projects-static.s3.amazonaws.com/congress/staffers/2014Q3-house-disburse-detail.csv",
"https://pp-projects-static.s3.amazonaws.com/congress/staffers/2013Q3-house-disburse-detail.csv",
"https://pp-projects-static.s3.amazonaws.com/congress/staffers/2012Q3-house-disburse-detail.csv",
"https://pp-projects-static.s3.amazonaws.com/congress/staffers/2011Q3-house-disburse-detail.csv",
"https://pp-projects-static.s3.amazonaws.com/congress/staffers/2010Q3-house-disburse-detail.csv",
"https://pp-projects-static.s3.amazonaws.com/congress/staffers/2009Q3-house-disburse-detail.csv"
)
alldata <- lapply(file_downloads, function(x) {read.csv(x, stringsAsFactors = F)})
df <- do.call(rbind, alldata) # Combine into one dataset