Analyzing who Congress follows on Twitter

Last year I put together scripts analyzing who various groups follow on Twitter – for example, staff at the New York Times and Wall Street Journal. The results ended up being pretty popular and were shared quite a bit around the web, and were even included in a TED talk. Earlier this year, various people asked me to do the same with Congress, but it made more sense to wait until elections were done and the new Congress was sworn in.

Last weekend I finally had a chance to modify and run the scripts again to find who Congress follows on Twitter. Keep in mind that these are these are their official Twitter accounts and not associated with the campaigns.

The congressional data was gathered from (the amazing) Sunlight Foundation Congress API and Twitter results from the Twitter API.

In addition to finding the results for all of 113th United States Congress, the script was run individually for various groups: democrats, republicans, senators, and representatives.

The Ruby scripts used are on Github. The results are displayed using Jekyll and hosted on S3. The script takes around 12 hours to run, so results aren't realtime. At some point it could be automated with a cron job.


To view the results, visit congress-on-twitter.tylerp.me.