Retrieves congress data from api.propublica.org

ppc_members(
  chamber = c("both", "house", "senate"),
  congress = "116",
  api_key = NULL,
  raw = FALSE
)

Arguments

chamber

Specify the chamber of Congress typically "house" or "senate"; sometimes "both" or "joint"

congress

The number of Congress of interest

api_key

The actual API key string provided by ProPublica.

raw

Logical indicating whether to return the raw response object. The default (FALSE) parses the content and returns a tibble data frame.

Value

Depending on the raw parameter, this function returns a tibble data frame with member information or the response object returned by curl

A data frame of congressional members information

Details

To apply for a ProPublica API use the following link: https://www.propublica.org/datastore/api/propublica-congress-api. Complete and submit the provided form to receive your API key.

See also

Examples

if (FALSE) { ## get data on house for 116th congress (requires API key) h116 <- ppc_congress(congress = "116", chamber = "house") }