powered by
Gets the bills depending on U.S.Congress, branch, and offsets
getBills(key, congress, branch, type, numFrom, numTo)
is the api key
it the number of the U.S. Congress: for example, 114 for the 114th U.S. Congress
is the House or the Senate branch
is the type of bills; options are introduced, updated, active, passed, enacted, vetoed
is the offset number beginning range: for example, 1 will get the first 20 bills
is the offset number to: for example, 40 will get bills 40 to 60. Entering numFrom as 1 and numTo as 40 will return bills 1 to 60
returns a dataframe with all bills and info from the API within the arguments' parameters
https://projects.propublica.org/api-docs/congress-api/
# NOT RUN { congress_115_enacted <- getBills(api_key,"115","house","enacted",1,500) congress_114_introduced <- getBills(api_key,"114","senate","introduced",1,100) # }
Run the code above in your browser using DataLab