get_current_members_by_statedistrict: Get Current Members by State/District

View source: R/get_current_members_by_statedistrict.R

get_current_members_by_statedistrictR Documentation

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
)

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.

Value

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

Examples

## Not run: 
get_current_members_by_statedistrict( 'MI', 'house', 11)
get_current_members_by_statedistrict( 'RI', 'senate')

## End(Not run)

ProPublicaR documentation built on Sept. 8, 2023, 5:53 p.m.