votes: votes methods

Description Usage Arguments Value Categories for the category parameter Examples

Description

votes methods

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
cg_vote(congress, chamber, session, id, key = NULL, as = "table", ...)

cg_votes_recent(chamber, key = NULL, as = "table", ...)

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

cg_votes_date(chamber, year = NULL, month = NULL, start_date = NULL,
  end_date = NULL, key = NULL, as = "table", ...)

cg_votes_senatenoms(congress, key = NULL, as = "table", ...)

cg_votes_explanations(congress, votes = FALSE, key = NULL, as = "table",
  ...)

cg_votes_explanations_category(congress, category, key = NULL, as = "table",
  ...)

cg_votes_explanations_member(member_id, congress, votes = FALSE,
  category = NULL, key = NULL, as = "table", ...)

cg_votes_explanations_member(member_id, congress, votes = FALSE,
  category = NULL, key = NULL, as = "table", ...)

Arguments

congress

(character) The number of the Congress this update took place during.

chamber

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

session

(integer) 1 or 2, depending on year (1 is odd-numbered years, 2 is even-numbered years)

id

(integer) roll call number, i.e., vote id

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

type

(character) the vote type, one of missed, party, loneno or perfect

year

(integer) a four digit year of the form YYYY

month

(integer) a 1 or 2 digit month

start_date, end_date

(character) start and end date, of the form YYYY-MM-DD

votes

(logical) whether to return votes data or not. default: FALSE

category

attribute describing the general reason for the absence or incorrect vote. see Details.

member_id

(character) The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress (http://bioguide.congress.gov/biosearch/biosearch.asp) or can be retrieved from a cg_members() request

Value

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

Categories for the category parameter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
cg_vote(115, "senate", 1, 17)
cg_votes_recent("senate")
cg_votes_type(114, "house", "missed")
cg_votes_date("senate", year = 2017, month = 1)
cg_votes_date("senate", year = 2017, month = 3)
cg_votes_date("senate", start_date = "2017-01-03", end_date = "2017-01-31")
cg_votes_senatenoms(114)
cg_votes_explanations(114, votes = FALSE)
cg_votes_explanations(114, votes = TRUE)
cg_votes_explanations_category(114, "voted-incorrectly")
cg_votes_explanations_member("S001193", 115, votes = FALSE)
cg_votes_explanations_member("S001193", 115, votes = TRUE)
cg_votes_explanations_member("S001193", 115, votes = TRUE,
 category = "personal")

## End(Not run)

rsunlight documentation built on May 1, 2019, 10:18 p.m.