This data contain Kieth’s Poole DW-NOMINATE measure of legislator ideology. Keith worked with various coauthors through the years, but Jeff Lewis now maintains the data, which you can find here.
These data contain the first dimmensions of the DW-NOMINATE scores from Republican and Democrat members of the House from the 100th to the most recent Congress.
The data set is at the member-Congress level, so that each row of the data set represents one election in a particular Congress (e.g., Nancy Pelosi in the 110th Congress).
For details on the raw data, see the codebook for the raw data.
# load packages
library(tidyverse)
# load data
nominate_df <- read_rds("nominate.rds")
# quick look at data
glimpse(nominate_df)
## Observations: 7,080
## Variables: 7
## $ congress <int> 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100...
## $ chamber <chr> "House", "House", "House", "House", "House", "House",...
## $ state <chr> "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AK", "AZ",...
## $ district <int> 2, 4, 3, 5, 6, 1, 7, 1, 2, 3, 5, 4, 1, 3, 1, 4, 2, 36...
## $ party <fct> Republican, Democrat, Democrat, Democrat, Democrat, R...
## $ name <chr> "DICKINSON, William Louis", "BEVILL, Tom", "NICHOLS, ...
## $ ideology <dbl> 0.398, -0.213, -0.042, -0.175, -0.060, 0.373, -0.085,...
congress
state
congressional_district
party
"Republican"
"Democrat"
ideology
# create a df with only the 114th congress
nominate114_df <- filter(nominate_df, congress == 114)
# a histogram of the 114th congress
ggplot(nominate114_df, aes(x = ideology, fill = party)) +
geom_histogram(alpha = 0.5, position = "identity") +
scale_fill_manual(values = c("blue", "red")) +
labs(title = "Ideology in the 114th Congress")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
# 5 most conservative members from 114th congress
top_n(nominate114_df, 5, ideology)
# 5 most liberal members from 114th congress
top_n(nominate114_df, 5, -ideology)