An gganimate and DW-NOMINATE scores

In a previous life, I studied how the U.S. Congress made laws. One question I was especially interested in was how the ideological composition of Congress changed over time. This is kind of a nice question to be interested in because Congress has existed in a current form for a few hundred years. Combined with the fact that we can estimate ideology using roll call votes, we have lots of data! There are TONS of books about how legislative ideology has changed over time. However, side stepping all that, we can see the changes in member ideology by plotting DW-NOMINATE scores over time. More specifically for this post, we can animate changes in DW-NOMINATE scores over time using gganimate.

Read More

Interfacing with SQL in R Using The odbc Package

One of the things I do at work is develop reusable pipelines to get data into R. In my case, this means either writing SQL or stealing some SQL someone else wrote and adapting it for my purposes. This isn’t something I necessarily have to do – they are more interested in the analysis part of what I can do – but I have found that if I am able to build robust analysis pipelines, I can work faster and build a catalog of data worth saving for future analysis. In my case, I try to design pipelines that look as such:

Read More

Upgraded to a new Jekyll version

Hi everyone, I noticed my page css wasn’t working anymore and updated the blog software to the newest version. While I haven’t posted in a while, I expect a few new posts before the start of summer.

Read More

Professional Update

Just a quick administrative update. I’ll be starting as a visiting assistant professor at the University of Minnesota, Morris in the fall. I’ll be teaching three courses in the fall and two in the spring. In the fall I’ll be teaching Introduction to American Government, Voting Behavior and Political Participation, and Introduction to Political Methodology. In the spring I’ll be teaching an online section of intro and a course on the American Presidency.

Read More

An Analogy Taken Quite Far

I’ve been working on some revisions to one of my dissertation chapters and I came across a chunk of the Congressional Record where a member of Congress is extending an anology offered by the bill’s sponsor. The context is that this debate comes from 1938 where Congress is trying to enact the first federal minimum wage. The original House sponsor of the bill has died (House Labor Chairman William Conneley) and was replaced with House Chairwoman Mary Norton. So Norton is taking over working on this legislation despite it not it being her bill, originally. I think the rest is clear within the context.

Read More

A Quick Description of Benford's Law with respect to Election Fraud

A couple of weeks ago at dinner with friends, I brought up how how some social scientists think we can analyze the way digits are distributed to uncover election fraud, but was unable to articulately explain it to my dinner companions. So, I wrote up a a quick thing help show what I meant. So, in this post, I’ll describe Benford’s Law (which is what the natural distribution of digits is sometimes called), show it mathematically (don’t worry, it is quick) before showing what it looks like graphically and then doing a quick analysis to see if the 2012 Minnesota Senate election fits applies to electoral results.

Read More

Plotting DW-NOMINATE scores without a group variable

One thing that people who study Congress inevitably need to deal with is plotting the main measure for Congressional ideology, DW-NOMINATE, by Congress and broken down by party. Depending on your needs, you might also need to differentiate between Northern and Southern Democrats in the plot. The scholars that developed DW-NOMINATE have made a pretty good version of this graph for their own blog, but I need something a little higher quality for published work.

Read More

Mapping Data in R

Feb 2017 edit: It has come to my attention when helping someone else with a map problem that I didn’t put in here that you have to add a “district of columbia” observation into your data in the alphabetical order and just put a zero for the variable of interest. If you don’t have the DC observation, it won’t merge correctly with the coordinates file.

Read More

Parables in the Congressional Record

As part of my dissertation work, I’ve been looking through old committee reports about tax legislation. Usually these things include rationales for why they are making changes to existing law. If the legislation is especially important, committee reports also include dissenting views or additional commentary about the legislation.

Read More

Why Boehner will (probably) keep his job

There is an article in Politico making the rounds implying that John Boehner’s speakership might be in jeopardy. The logic goes that conservative Republicans have gained enough sway to get their own way within the Chamber and or caucus. This was followed up with a piece about how most Democrats won’t support such a coup, with one saying “I’d probably vote for Boehner [because] who the hell is going to replace him? [Ted] Yoho?.” This implies that Congressional Democrats are wary of a Boehner replacement for ideological reasons. In this post, I want to give a little context about how Congressional parties change and how Speakers get toppled.

Read More

No need to protect President on KeystoneXL

A little late, but here is an analysis of the votes for the KeystoneXL pipeline vote in both houses of Congress. DW-NOMINATE, shown in the linked graph, is the standard way of measuring ideology in modern studies of the United States Congress. The Y-axis used to measure views on race, and now maybe taps region (but we don’t know). The X-axis is the main ideological axis. Negative numbers mean more liberal and positive numbers mean more conservative (usually the values are capped at -1, +1). As their post points out, their model accurately predicts that moderate democrats would oppose the legislation (and which is what we largely saw).

Read More

Changing Senate rules for policy gain is no big deal

Over the last few days, House conservatives have started asking Senate Republicans to change the Senate rules to weaken the filibuster so the Senate could more easily pass the Department of Homeland Security funding bill with immigration restrictions attached. Even though that would allow the bill to advance through the Senate, President Obama would almost certainly veto it. I imagine Congressional Republicans are okay with that because it makes it a much more prominent issue that they feel they can use against Democrats.

Read More

Tool Driven Revolutions in the Social Sciences

There are two kinds of scientific revolutions, those driven by new tools and those driven by new concepts. Thomas Kuhn in his famous book, The Structure of Scientific Revolutions, talked almost exclusively about concepts and hardly at all about tools. His idea of a scientific revolution is based on a single example, the revolution in theoretical physics that occurred in the 1920s with the advent of quantum mechanics. This was a prime example of a concept-driven revolution. Kuhn’s book was so brilliantly written that it became an instant classic. It misled a whole generation of students and historians of science into believing that all scientific revolutions are concept-driven. The concept-driven revolutions are the ones that attract the most attention and have the greatest impact on the public awareness of science, but in fact they are comparatively rare. In the last 500 years, in addition to the quantum-mechanical revolution that Kuhn took as his model, we have had six major concept-driven revolutions, associated with the names of Copernicus, Newton, Darwin, Maxwell, Freud, and Einstein. During the same period there have been about twenty tool-driven revolutions, not so impressive to the general public but of equal importance to the progress of science. Two prime examples of tool-driven revolutions are the Galilean revolution resulting from the use of the telescope in astronomy, and the Crick-Watson revolution resulting from the use of X-ray diffraction to determine the structure of big molecules in biology. The effect of a concept-driven revolution is to explain old things in new ways. The effect of a tool-driven revolution is to discover new things that have to be explained…

Read More

The (lack of) Predictability in Obama’s Executive Action

One criticism political scientists often get is that there is a pretty strong “conservative” bias in the sense that political science generates a lot of null changes. There was never going to be a Romney upset, there are rarely any very big policy changes, everything just sort of continues along the same path that it has been on for however long. Of course, big things do happen every now and then but we’re just not very good at predicting when it’ll happen or what it will be so we assume minimal change from a day to day basis.

Read More

Statistics of Income Data is Great

I’ve been looking through old IRS publications called “Statistics of Income” in order to cull some data to incorporate into my dissertation and there is a lot of cool stuff there. A motivated researcher could make an entire career with the data.1 Here is a summary of some of the good stuff in addition to some screen shots of cool pages. Sorry for the break, but the pictures are fairly big so it seemed worth cutting up.

Read More

A New Blogging Start

I’ve tried maintaining a blog before, but haven’t always been the best at upkeep.1 Now that I have advanced a ways through my graduate studies, today seems like a good time to try again.

Read More