Home

Awesome

This repository contains code to build cosponsorship networks from bills (and motions) passed in the Danish Parliament.

HOWTO

Replicate by running make.r in R.

The data.r script downloads information on bills and sponsors. The code is pretty straightforward and excludes only a handful of bills for which the scraper gets the columns wrong.

The build.r script then assembles the edge lists and plots the networks, with the help of a few routines coded into functions.r. Adjust the plot, gexf and mode parameters to skip the plots or to change the node placement algorithm.

DATA

Bills

The data contains three types of legislative items: "motions" (Beslutningsforslag, "B"), "bills" (Lovforslag, "L"), and resolutions (Forslag_til_vedtagelse, "V"). Only the first two are passed to the network building routine (resolutions are nonbinding). The networks are not radically different if resolutions are included.

Sponsors

Note -- due to how missing sponsors are handled, the version of sponsors.csv that is saved to the data folder contains only an intermediary version of the sponsors data. To retrieve the finalized dataset with the variables listed above, export the sponsors object s after running data.r in full.

THANKS

Thanks to Niels Erik Rasmussen and Thomas Leeper for useful feedback on a preliminary version of the code.