Learn R Programming

ProPublicaR (version 1.1.4)

get_state_party_counts: Get State Party Counts

Description

To get party membership counts for all states (current Congress only), use the following function. HTTP Request: GET https://api.propublica.org/congress/v1/states/members/party.json

Usage

get_state_party_counts(page = 1, myAPI_Key)

Value

List of returned JSON from endpoint that retrieves

Arguments

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_state_party_counts()
}

Run the code above in your browser using DataLab