Here’s the short version: I made a site called Filibusted that just won Sunlight Labs’ “Apps for America” contest.
I started to write out the long version, but I don’t have Ken Burns or a bunch of old‐timey photographs. I’ll split the difference.
As some of you already know, yelling at Congress (or at coverage of Congress) is a fond pastime of mine. Lately I’ve been yelling about Senate obstructionism. In the Senate, all it takes to slow things down is to debate indefinitely — or even to signal your intent to debate indefinitely. This is the filibuster.
Those paying attention caught on quite a while ago that the tone of our politics is changing, that the no‐man’s land between the two parties increases in size every year. As a result, it’s become common for the minority in Congress to oppose the majority’s agenda by default, eschewing any assessment of the policy merits. Throwing up procedural road blocks is “cheap” — in the same way that fouls would be “cheap” in basketball if one had to commit a dozen of them to foul out of a game. The rules afford stalemate. As a result, then, a trend is clear from the last few decades of data: the filibuster is being used more and more often for less and less substantive reasons.
I must note, early and often, that this is not a partisan argument. This sort of behavior is saddening no matter which party is in power. Right now, Democrats happen to control Congress and the White House, but there are just enough Republican senators to slow things down. They’re entitled to do so. The rules allow it, after all.
But two points must be made. First: the filibuster isn’t sacred, isn’t protected by the Constitution, isn’t a bald eagle or an apple pie or a president’s head on the side of a mountain. The Senate can vote to change its own rules; they do so quite often. Second: if the filibuster is here to stay, let’s at least treat it as newsworthy, and let public opinion judge whether the obstruction is warranted.
So that’s what Filibusted is. It scores senators based on their tendency to obstruct legislation, but it lets the individual decide which to reward: high scores or low scores.
I had the idea for Filibusted in January — I was between jobs and looking for a project. A few months before, I’d come across GovTrack, the heaven‐sent site that makes structured data out of THOMAS and other sources.
I knew the filibuster had been invoked quite a bit in the previous Congress (the 110th), but I didn’t know what sort of relics to search for in the records. How does a filibuster work? Does a senator slap Harry Reid in the face with a glove? I tried searching the Congressional Record for telling words or phrases — filibuster, cloture, etc. — without much success.
One evening, over IM, I ran my half‐baked idea past Justin Palmer. Justin had a bit of experience with this sort of thing; he’d just set up @legislate, the bot that tweets the outcomes of votes in the House and Senate. Halfway through my soliloquy explaining the project I had in mind, he said, “Hold on a sec”; a minute later, he sent a URL to a Gist containing the ~100 lines of code that powered @legislate.
As it happened, this was the perfect starting point. The data used by @legislate — a list of all roll call votes, as provided by GovTrack — was exactly what I needed to search through. Certain votes have a summary that contains the phrase “On The Cloture Motion…”; that means it’s a cloture vote, an attempt to stop a filibuster.
So the task became clear: keep track of cloture votes. Furthermore, by keeping track of the ratio of cloture votes to total roll call votes, I could tell how much time the Senate spent with stupid internal housekeeping instead of actual stuff.
I had been away from Rails for about a year and a half, but it all came flooding back to me. As Rails projects go, it’s quite simple; read‐only, no registration or authentication needed.
Data gets shoved into the database on a nightly basis. I wrote a couple Rake tasks for importing data from GovTrack using its raw XML data, then iterating through each vote with Hpricot. If a vote isn’t a cloture vote, or if it’s already in the database, I ignore it.
But if it’s a new cloture vote, I mark it down; I also record information about how each senator voted. Right now I screen‐scrape this data from the GovTrack page for that particular vote — to do so from the XML would be far more convoluted — but I’ll probably switch this part to use the New York Times Congress API, as long as the data is as “fresh” as GovTrack’s.
I also try to keep track of what is being filibustered. Usually it’s a bill. Sometimes it’s an amendment to a bill. GovTrack’s data will cross‐reference associated bills and amendments. Filibusters of nominations — like the one that just happened — are trickier; there’s nothing to reference. If a senator filibusters a bill, I can show a link to the GovTrack page for that bill; but there’s no canonical URL for a nomination.
In the end, though, this isn’t a big deal. I’ve got a
ClotureVote model that has one
Voteable object — which can be a
Amendment, or a
Nomination. All three of these inherit from
Voteable in some single‐table‐inheritance voodoo.
Speaking of awesome Rails features: I was able to take a bunch of lazy shortcuts, doing expensive computations in models, because my data changes only once every 24 hours. This is quite helpful. I can page‐cache the entire site, clearing the cache only when new data gets imported.
I’m also grateful for the emergence of Phusion Passenger, which didn’t exist last time I used Rails. Because of Passenger and the aforementioned page caching, the site runs off a meager 256MB slice with no fuss.
I am so thankful to Sunlight Labs for sponsoring this contest. The prospect of a cash prize is exactly the sort of thing that helps me push a project over the “75% done” hump; I imagine that’s true for others as well.