rollcall
object from the flat file format for roll
call data used by
Keith Poole and Howard Rosenthal.readKH(file,
dtl=NULL,
yea=c(1,2,3),
nay=c(4,5,6),
missing=c(7,8,9),
notInLegis=0,
desc=NULL,
debug=FALSE)
dtl
file
(information about votes); default is NULL
, indicating no
dtl
filec(1,2,3)
, which corresponds to Yea,
Paired Yea, and Announced Yea in Poole/Rosenthal dc(4,5,6)
, which corresponds to
Announced Nay, Paired Nay, and Nay in Poole/RosenthNA
, possible a vector, code(s)
for missing data. Default is c(0,7,8,9,NA)
; the first four
codes correspond to Not Yet a Member, Present (some Congresses),
Present (some Congresses), and Not Voting.NA
, possibly a vector, code(s) for
the legislator not being in the legislature when a particular roll
call was recorded (e.g., deceased, retired, yet to be
elected). Default is 0
for Poole/Rosenthal data fi82nd U.S. House
of Representatives
; default is NULL
rollcall
, with components created
using the identifying information in the Poole/Rosenthal files. If
the function can not read the file (e.g., the user specified a URL and
the machine is not connected to the Internet), the function fails with
an error message (set debug=TRUE
to help resolve these issues). This function relies on some hard-coded features of Poole-Rosenthal
flat files, and assumes that the file
being supplied has the following
structure (variable, start-end columns):
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
This function reads data files in that format, and creates a
rollcall
, for which there are useful methods such as
summary.rollcall
. The legis.data
component of the
rollcall
object is a data.frame
which
contains:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The rownames
attribute of this data frame is a
concatenation of the legislators' names, party abbreviations (for
Democrats and Republicans) and state, and (where appropriate), a
district number; e.g., Bonner (R AL-1)
. This tag is also
provided in the legis.name
component of the returned rollcall
object.
Poole and Rosenthal also make dtl
files available for
Congresses 1 through 106. These files contain information about the
votes themselves, in a multiple-line per vote ascii
format, and
reside in the dtl
director of Poole's web site, e.g.,
dtl
file for
the 102nd Senate. The default is to presume that no such file exists.
When a dtl
file is available, and is read, the
votes.data
attribute of the resulting rollcall
object is a data.frame
with one record per vote, with
the following variables:
[object Object],[object Object]
The dtl
files are presumed to have the date of the rollcall in
the first line of text for each roll call, and lines 3 onwards contain
descriptive text.
Finally, note also that the Poole/Rosenthal data sets often include
the U.S. President as a pseudo-legislator, adding the announced
positions of a president or the administration to the roll call
matrix. This adds an extra
Poole, Keith.
Rosenthal, Howard L. and Keith T. Poole. United States Congressional
Roll Call Voting Records, 1789-1990: Reformatted Data [computer
file]. 2nd ICPSR release. Pittsburgh, PA: Howard L. Rosenthal and Keith
T. Poole, Carnegie Mellon University, Graduate School of Industrial
Administration [producers], 1991. Ann Arbor, MI: Inter-university
Consortium for Political and Social Research [distributor], 2000.
rollcall
h107 <- readKH("ftp://voteview.com/hou107kh.ord",
desc="107th U.S. House of Representatives")
s107 <- readKH("ftp://voteview.com/sen107kh.ord",
desc="107th U.S. Senate")
## Jeff Lewis has quasi-real-time roll call data on his site
## in the Poole/Rosenthal format
s110 <- readKH("http://adric.sscnet.ucla.edu/rollcall/static/S110.ord",
desc="110th U.S. Senate (2007-08)",
debug=TRUE)
Run the code above in your browser using DataLab