sen_votes: Returns voting information from the Senate floor for the date...

Description Usage Arguments Value Note Author(s) Examples

View source: R/sen_votes.R

Description

Returns voting information from the Senate floor for the date requested.

Usage

1
sen_votes(date = NULL, end_date = NULL, binary = TRUE, ascii = TRUE)

Arguments

date

character or integer. Format YYYYMMDD.

end_date

character or integer. Format YYYYMMDD. If end_date is supplied, information on all votes between the initial date (date) and end_date is returned. See the notes below.

binary

logical. If TRUE, the default, transforms votes into 1 for "yes", 0, for "no" and NA for everything else. If FALSE, returns a character vector of vote decisions.

ascii

logical. If TRUE, the default, strips Latin characters from the results.

Value

A tibble, of classes tbl_df, tbl and data.frame.

Note

The maximum period allowed by the API is currently 60 days. If the period requested is larger than this, an error message is returned. For a full set of votes for each legislature, see data("senate_nominal_votes").

Author(s)

Robert Myles McDonnell, Guilherme Jardim Duarte & Danilo Freire.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
sen_votes(date = "20130516")

# Some votes are secret:
ssshhh <- sen_votes("20160301", binary = FALSE)

# All votes between two periods (might take a little while):
longer <- sen_votes(date = "20160301", end_date = "20160415")

## End(Not run)

congressbr documentation built on Dec. 16, 2019, 1:21 a.m.