Parse bill sponsor information from local json or API response and return a data frame.

parse_bill_sponsor(bill)

Arguments

bill

Path to bill json file or list objected returned from get_bill

Value

A data frame of 9 columns. For more details, see documentation.

Details

Sponsor type is represented in numeric id. See lookup table for description.

Examples

HB1 <- system.file("extdata", "bill/HB1.json", package = "legiscanrr") HB1 <- parse_bill_sponsor(HB1) str(HB1)
#> Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 5 obs. of 9 variables: #> $ people_id : int 6033 6034 6042 6060 12081 #> $ party_id : int 2 2 2 2 2 #> $ party : chr "R" "R" "R" "R" ... #> $ name : chr "Carl Gatto" "Robert Lynn" "Craig Johnson" "Peggy Wilson" ... #> $ sponsor_type_id : int 0 0 0 0 0 #> $ sponsor_order : int 0 0 0 0 0 #> $ committee_sponsor: int 0 0 0 0 0 #> $ committee_id : chr "0" "0" "0" "0" ... #> $ bill_id : int 230084 230084 230084 230084 230084