readDW_NOMINATE: Read the DW-NOMINATE data from their website.

View source: R/readDW_NOMINATE.R

readDW_NOMINATER Documentation

Read the DW-NOMINATE data from their website.

Description

Read the DW-NOMINATE data from their website using read_csv, adding a Year = 2*congress+1787, which is the first year of each 2-year congress.

Usage

readDW_NOMINATE(file=
"https://voteview.com/static/data/out/members/HSall_members.csv", 
...)

Arguments

file

file argument passed to read_csv.

...

optional arguments for read_csv.

Details

This is written to make it easy for users to download the DW-NOMINATE data from their website, assuming it should be easier to remember readDW_NOMINATE than

readr::read_csv("https://voteview.com/static/data/out/members/HSall_members.csv").

Value

a tibble with columns

congress

number of the Congress starting with 1 in 1789.

chamber

character 'House', 'Senate' or 'President'

icpsr

number icpsr (number assigned by the Inter-university Consortium for Political and Social Research (ICPSR)).

state_icpsr

number for the state used by ICPSR.

district_code

number between 0 and 99 indicating the district number within the state. This is 0 when (chamber %in% c('President', 'Senate') and occasionally when (chamber == 'House'). "At-large" members of the US House are coded 98 or 99. There were some before 1970. However, as of 2024-10-01, but there have been none since 1970.

state_abbrev

Either 'USA' or a 2-letter abbreviation for this state in the US.

party_code

positive numeric. As of 2024-09-30, over 80 percent of the members of Congress since 1857 have been either 100 (Democrats) or 200 (Republicans), and since 1943, less than 1 percent of the US Congress has not been either 100 or 200.

occupancy, last_means

numeric = 0:7 or 'NA' with all 'NA's prior to 2017.

bioname

character name of politician, starting with "WASHINGTON, George".

bioguide_id

character The ID code used by the Biographical directory of the United States Congress, being the first character of the last name of the person followed by a 6-digit number or 'NA' for US Presidents who were never members of Congress.

born, died

numeric 4-digit birth year or 'NA'

nominate_dim1, nominate_dim2

numeric between -1 or 1 or 'NA' described in Poole (2005).

nominate_log_likelihood

numeric negative number or 'NA'

nominate_goe_mean_probabilty

numeric number between 0 and 1 or 'NA'

nominate_number_of_votes

numeric positive number or 'NA'

nominate_number_of_errors

numeric nonnegative number or 'NA'

conditional

logical or 'NA'

nokken_poole_dim1, nokken_poole_dim2

numeric between -1 or 1 or 'NA' described by Nokken and Poole (2004).

Year

numeric First year of each 2-year computed from congress as (2*congress+1787).

Author(s)

Spencer Graves

Source

Embedded in an R Markdown vignette by UCLA political science professor Jeff Lewis in the voteview project on 'GitHub'.

References

Voteview.com website.

Timothy P. Nokken and Keith T. Poole (2004) "Congressional Party Defection in American History." Legislative Studies Quarterly, 29:545-568,.

Keith T. Poole (2005) Spatial models of parliamentary voting (Cambridge U. Pr.).

See Also

read_csv

Examples

# Wrap in try(...) so it won't throw an error 
# if the Voteview website is not available. 

Nominate <- try(readDW_NOMINATE())

Ecfun documentation built on April 12, 2025, 2:27 a.m.