Message Boards Message Boards

DW-NOMINATE and Roll-Call Voting Behavior in the US Congress

Posted 8 years ago

enter image description here

I don't want to wade too deeply into political waters here, but given how much of the national conversation lately has revolved around polarization in national political parties, I thought that others might be interested in exploring this dataset. If you haven't heard of it before, here's a Wikipedia summary:

In[2]:= WikipediaData["NOMINATE (scaling method)", "SummaryPlaintext" ]

Out[2]= "NOMINATE (an acronym for Nominal Three-Step Estimation) is a \
multidimensional scaling application developed by political \
scientists Keith T. Poole and Howard Rosenthal in the early 1980s to \
analyze preferential and choice data, such as legislative roll-call \
voting behavior. As computing capabilities grew, Poole and Rosenthal \
developed multiple iterations of their NOMINATE procedure: the \
original D-NOMINATE method, W-NOMINATE, and most recently DW-NOMINATE \
(for dynamic, weighted NOMINATE). In 2009, Poole and Rosenthal were \
named the first recipients of the Society for Political Methodology's \
Best Statistical Software Award for their development of NOMINATE, a \
recognition conferred to \"individual(s) for developing statistical \
software that makes a significant research contribution.\""

And here's the primary website for retrieving data and deeper explanations of methodology and use of the data:

http://voteview.com/dwnl.html

In the most simplistic terms, this dataset attempts to provide a quantitative measurement of where a legislator's roll-call voting behavior places them on the liberal-conservative spectrum (where positive values are more conservative, and negative are more liberal).

Some pre-curated data using "common space" DW-NOMINATE scores is available as a ResourceObject in the (beta) Wolfram Data Repository, so if you're using version 11 (or if you're using the Wolfram Development Platform) you can dive in and do some analysis very quickly.

data = ResourceData["DW-NOMINATE for US Congress"];

There's data available for everyone from the 1st through the 113th Congress, which obviously includes many political parties that aren't a factor anymore; I'll do one quick transformation since I want to focus on the Republican and Democratic parties, but lump everyone else into an "Other":

dataWithNames = 
  Append[#, <|
      "PartyName" -> 
       Switch[#PartyCode, 100, "Democratic", 200, "Republican", 
        Except[100 | 200], "Other"]|>] & /@ data;

Now we can make a simple Manipulate that will plot values for legislators by state and over time:

states = EntityList[
   EntityClass["AdministrativeDivision", "AllUSStatesPlusDC"]];

Manipulate[
 ListPlot[GroupBy[
    Select[dataWithNames, #State == 
       state &], #PartyName &][{"Democratic", "Republican", "Other"}, 
   All, {"CongressNumber", "CoordDim1"}], 
  PlotStyle -> {Blue, Red, Darker[Green]}, 
  PlotRange -> {-1.2, 1.2}], {state, states}, 
 ControlType -> PopupMenu]

enter image description here

Or we could just as easily deploy this as an interactive form:

StatePlot[state_Entity] := 
 ListPlot[GroupBy[
    Select[dataWithNames, #State == 
       state &], #PartyName &][{"Democratic", "Republican", "Other"}, 
   All, {"CongressNumber", "CoordDim1"}], 
  PlotStyle -> {Blue, Red, Darker[Green]}]

f = FormPage[{"State" -> "USState"}, Rasterize[StatePlot[#State]] &];

In[16]:= CloudDeploy[f, Permissions -> "Public"]
Out[16]= CloudObject["https://www.wolframcloud.com/objects/9b83db8f-\
c83c-40e8-b66f-d4d35d52ed61"]

So here's the final link: https://www.wolframcloud.com/objects/9b83db8f-c83c-40e8-b66f-d4d35d52ed61

I'm just going to put this all out without editorial comment, but there's obviously a lot more to explore with this data, and I hope this is enough to grab someone's interest and spark some more ideas.

POSTED BY: Alan Joyce
3 Replies

One more view, taking the median value by party for each congress:

median = (Median /@ 
      GroupBy[#, #CongressNumber &][[All, All, "CoordDim1"]]) & /@ 
   GroupBy[dataWithNames, "PartyName"];

ListPlot[median[{"Republican", "Democratic"}], Joined -> True, 
 Filling -> Axis, PlotStyle -> {Red, Blue}]

enter image description here

POSTED BY: Alan Joyce

For anyone still interested in this topic, we've published an update to this resource (still at https://datarepository.wolframcloud.com/resources/DW-NOMINATE-for-US-Congress). There have been a few changes in the source data structure, reflected in the updated resource, but now all the data is updated through the 117th Congress.

current = 
  Association /@ 
   GroupBy[
     Select[
      ResourceData[
       "DW-NOMINATE for US Congress"], #CongressNumber == 
        117 &], #PartyCode &][All, 
    All, #Name -> {#NominateDim1, #NominateDim2} &];
ListPlot[Values@current[[All, All]], 
 PlotStyle -> {Red, Blue, Darker[Green]}, ImageSize -> Full, 
 PlotTheme -> "Detailed"]

enter image description here

POSTED BY: Alan Joyce

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations! We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract