Since I couldn’t find a list of twitter feeds from the US Congress, I made one today.
Now you can get a snap-shot of our legislators highest priorities, as captured in 140 characters at a time, at twitter.com/CongressBirdie/legislators.
In case you’re curious how I did it without painstakingly searching each congressperson’s name and username to add to my list by hand, I’ll let you in on my little my secret: I relied heavily on a few open source projects to automate the process. To find the Twitter IDs, I simply looked them up from the very excellent Github project unitedstates/congress-legislators. Then I used the Python Twitter Tools module to chat with the Twitter API to create the list and add all the legislators in bulk.
Life wasn’t exactly as easy as all that, though. I had to make a little tweaks in order to gather all the tweets. First, there is an easy-to-fix bug in the Python Twitter Tools package. You need to make sure it knows how to POST to lists/members/create_all command. Right now employs a GET request—and that doesn’t work. It looks like at least one other person has run into the same problem. If you run into the problem, you can read how I fixed it.
But Twitter didn’t handle my create_all request as they promised. The documentation claims you can add up to 100 users to your list at a time, but that wasn’t my experience. Instead, I could only get the API to add legislators 25 at a time. But that’s a small price to pay for democracy.
And this list is active! In the time it took me to write this post, the list reported 13 new tweets. Your tax dollars hard at work.