Learn R Programming

rsunlight (version 0.7.0)

members: Members functions

Description

Members functions

Usage

cg_members(congress, chamber, key = NULL, as = "table", ...)

cg_member(member, key = NULL, as = "table", ...)

cg_members_new(key = NULL, as = "table", ...)

cg_members_state_district(chamber, state, district = NULL, key = NULL, as = "table", ...)

cg_members_leaving(congress, chamber, key = NULL, as = "table", ...)

cg_members_votes(member, key = NULL, as = "table", ...)

cg_members_compare_votes(member1, member2, congress, chamber, key = NULL, as = "table", ...)

cg_members_compare_bill_sponsors(member1, member2, congress, chamber, key = NULL, as = "table", ...)

cg_members_bill_cosponsors(member, type, key = NULL, as = "table", ...)

Arguments

congress

The number of the Congress this update took place during.

chamber

The chamber this update took place in. 'house' or 'senate'.

key

your ProPublica API key; pass in or loads from environment variable stored as PROPUBLICA_API_KEY in either your .Renviron, or similar file locatd in your home directory

as

(character) IGNORED FOR NOW

...

optional curl options passed on to crul::HttpClient. See curl::curl_options()

member, member1, member2

A member ID

state

A two character state code

district

House of Representatives district number (House requests only)

type

Type of bill. cosponsored or withdrawn

Value

various things for now, since return objects vary quite a bit among the different members routes

Examples

Run this code
# NOT RUN {
cg_members(congress = 115, chamber = "senate")
cg_member(member = 'K000388')
cg_members_new()
cg_members_state_district('senate', 'RI')
cg_members_leaving(congress = 115, chamber = "house")
cg_members_votes('K000388')
cg_members_compare_votes("G000575", "D000624", 114, "house")
cg_members_compare_bill_sponsors("G000575", "D000624", 114, "house")
cg_members_bill_cosponsors("B001260", "cosponsored")
# }

Run the code above in your browser using DataLab