UShouse.senate: Create a list of members of the US House and Senate

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/UShouse.senate.R

Description

NOTE: THIS FUNCTION IS CURRENTLY UNAVAILABLE: A CALL TO "RCurl::getURL" THAT RETURNED INFO ON ALL MEMBERS OF THE US HOUSE IN 2013 AND 2016 ONLY RETURNS 222 CHARACTERS AS OF 2018-01-11.

If and when a fix for this is found, this function may again:

Combine the output of readUShouse and readUSsenate.

Usage

1

Arguments

house, senate

data.frames as returned by the functions readUShouse and readUSsenate, respectively.

Details

Convert the two into a common format and rbind.

Value

a data.frame with the following columns:

Chamber

A factor identifying "House" vs. "Senate", indicating whether the person is in the US House or Senate

state

A factor identifying the state using the USPS 2-letter state code (all caps)

district

"0" or "At-Large" for members of the US House representing an entire state or integers in character format indicating the district. For the Senate, this contains the "class", which codes the year of the next election for that seat is an integer multiple of 6 years after 2012, 2008, or 2010 for class "1", "2", or "3", respectively.

party

a factor identifying the party affiliation of each representative, e.g., 'D', 'R', 'I'.

surname

family name

givenname

first name with possibly a middle name, nickname, and suffix (e.g., Jr., III).

Author(s)

Spencer Graves

See Also

readUShouse readUSsenate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if(FALSE){
#NOTE:  THIS FUNCTION IS CURRENTLY UNAVAILABLE: A CALL TO 
#"RCurl::getURL" THAT RETURNED INFO ON ALL MEMBERS OF THE 
#US HOUSE IN 2013 AND 2016 ONLY RETURNS 222 CHARACTERS 
#AS OF 2018-01-11.  

#  If and when a fix for this is found, this function may again 
#  work as it did 2013-2016.

if(!fda::CRAN()){
house <- readUShouse()

USreps <- UShouse.senate(house)
}}

Ecfun documentation built on May 2, 2019, 6:53 p.m.