knitr::opts_chunk$set(
  collapse = TRUE,
  warning = FALSE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

legiscanrr

lifecycle

The goal of legiscanrr is to provide tools in R to easily interact with the LegiScan API. You can use the API to retrieve information about legislations in US states and Congress, such as bill details, sponsors, full bill texts, roll call records and more.

This package contains two main groups of functions:

Installation

You can install the development version from GitHub with:

install.packages("devtools")
devtools::install_github("fanghuiz/legiscanrr")

Example

library(legiscanrr)

Get bill details via API using get_bill()

bill_example <- get_bill(bill_id = 230086)

head(bill_example)

Extract bill metadata using parse_bill()

bill_meta <- parse_bill(bill_example)

str(bill_meta)

Extract bill progress information using parse_bill_progress()

parse_bill_progress(bill_example)

Extract information about sponsors for this bill using parse_bill_sponsor()

sponsor <- parse_bill_sponsor(bill_example)

str(sponsor)


fanghuiz/legiscanrr documentation built on Jan. 13, 2020, 4:51 a.m.