Searching Bill Information in US Congress Website.

searchBill(key = NULL, congress = NULL, chamber = "Both",
  billtype = "bills", billstatus = NULL, subject = NULL,
  house_committee = NULL, senate_committee = NULL, party = NULL,
  pageSort = "documentNumber", pageSort_direction = "descending",
  maxN = 1000, urlonly = FALSE, searchURLprint = FALSE)

Arguments

key

A character element of keywords.

congress

A character vector of target congress(es) (e.g, c(116,115)).

chamber

A character of target chamber. One of "House", "Senate", and "Both". The default is both chambers.

billtype

A character vector of target bill types. Choose any combination of "bills", "amendments", "resolutions", "joint-resolutions", and "concurrent-resolutions". If NULL, include all types. The defauls is "bills".

billstatus

A character vector of target bill statuses. Choose any combination of "introduced", "committee","floor","failed-one","passed-one", "passed-both","resolving","president","veto", and "law". If NULL (default), include bills of all statuses.

subject

A character vector of policy subject areas. Choose any combination of subjects provided in Subject Area List. If NULL (default), include all policy areas.

house_committee

A character vector of House committees. Choose any combination of committees from House Committee List.

senate_committee

A character vector of Senate committees. Choose any combination of committees from Senate Committee List.

party

A character vector of parties of a sponsor. Choose any combination of "Democratic","Republican","Independent" and "Independent Democrat". If NULL, include any party.

pageSort

The way the bills in search are sorted. Choose one of "relevancy", "title", "documentNumber" (default), "lawNumber", "latestAction", and "dateOfIntroduction".

pageSort_direction

Direction of pageSort. Choose "descending" (default) or "ascending". Not applied if pageSort is one of "relevancy" and "title".

maxN

The max number of bills to import. The default is 1000.

urlonly

if TRUE, export character vector or bill summary page URLs. If FALSE, export data.frame of bill URLs and other extractable information from search page.

searchURLprint

If TRUE, return search page URL.

Value

If urlonly==FALSE and searchURLprint==FALSE, A data.frame that contains following variables.

  • ID: Bill ID (See BillIDfromURL)

  • URL: Bill summary page URLs

  • Title: Bill title

  • Sp_Chamber: Chamber (i.e., House or Senate) of sponsor

  • Sp_Name: Sponsor full name

  • Sp_LastName: Sponsor last name

  • Sp_Party: Party of sponsor

  • Sp_State: State of sponsor

  • Sp_District: District of sponsor

  • Cosp_N: Number of cosponsors

  • IntroducedDate: Date of introduction

  • ActLatestDate: Date of the latest action

  • ActLatestText: Content of the latest action

  • Committees: Name of committees

See also

Examples

# Search all bills (importing only newest 10) billdt <- searchBill(maxN=10)
#> 254240 legislations found. Import first 10. #> #> Getting URL from search page 1...
# Seach bills with keyword "air" (importing newest 100) billdt <- searchBill(key="air", maxN=100)
#> 14975 legislations found. Import first 100. #> #> Getting URL from search page 1...