Home

Awesome

This repository creates U.S. Congress bill cosponsorship networks data similar to that of Fowler, Waugh and Sohn, ranging from 1973 to today in both chambers. The code mimicks the code used for the parlnet project, which builds legislative cosponsorship networks for European countries.

Static plots of the networks are viewable on that page.

HOWTO

Replicate by running make.r in R after checking the dependencies at the top of the script.

The 01-data.r script downloads information on bills and sponsors:

The 01-data.r script exports cosponsorships as CSV edge lists instead of adjacency matrices. The edge lists feature one bill per row and the following variables:

The 02-build.r script weights the network ties by using Gross, Kirkland and Shalizi's weighted propensity to cosponsor, which is useful for subsetting the plots to a certain tie intensity. Below are two example graphs showing the 113rd Congress at two different edge weight thresholds:

Node colors show party affiliations (Democrats in blue, Republicans in red, independents in green), and placement is Fruchterman-Reingold force-directed. It should be very easy to play with the network objects produced by 02-build.r to produce different plots, including plots suited for interactive visualization.

BONUS

The two separate scripts in the modularity folder will compute and plot the party-based modularity scores of the networks, using the same method as Waugh et al. to also compute the maximum modularity of the networks. Each modularity score is computed against the three different weighting schemes carried by the networks, as well as against unweighted ties.

The code will also compare empirical modularity to modularity in randomly rewired graphs with identical degree distributions, and empirical modularity to modularity from a randomised partition vector, like Kirkland suggests. That part of the code is particularly slow if you keep it at 1,000 simulations per network like the code does by default.

Please feel free to open an issue if you have comments or suggestions.