Learn R Programming

ProPublicaR (version 1.1.4)

get_current_members_by_statedistrict: Get Current Members by State/District

Description

Senate Request: GET https://api.propublica.org/congress/v1/members/chamber/state/current.json House Request: GET https://api.propublica.org/congress/v1/members/chamber/state/district/current.json

Usage

get_current_members_by_statedistrict(
  state,
  chamber,
  district,
  page = 1,
  myAPI_Key
)

Value

List of returned JSON from endpoint that retrieves biographical and Congressional role information for a particular member of Congress by State/District

Arguments

state

Two-letter state abbreviation

chamber

house or senate

district

House of Representatives district number (House requests only). For states with at-large districts (AK, DE, MT, ND, SD, VT, WY), territories (GU, AS, VI, MP), commonwealths (PR) and the District of Columbia, use a district value of 1.

page

Results come in batches of 20. The page parameter specifies which one to retrieve.

myAPI_Key

API key from Propublica To use the congress API, you must sign up for an API key.

Examples

Run this code
if (FALSE) {
get_current_members_by_statedistrict( 'MI', 'house', 11)
get_current_members_by_statedistrict( 'RI', 'senate')
}

Run the code above in your browser using DataLab