Awesome
This repository contains code to build cosponsorship networks from bills passed in the lower/national chamber of the Swiss Parliament.
HOWTO
Replicate by running make.r
in R.
The data.r
script downloads information on bills and sponsors, using information from the website of the Swiss parliament and from its open data portal. All sponsor photos should download fine.
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 parameters in make.r
to skip the plots or to change the node placement algorithm.
DATA
Bills
chamber
-- chamber of introduction (1: National or 2: States)legislature
-- legislatureid
-- unique identifierdate
-- date of introduction (yyyy-mm-dd)title
-- short titlesponsors
-- semicolon-separated URLs of single first authorn_au
-- total number of sponsors (first author + cosponsors)
Sponsors
legislature
-- legislature (imputed from date of entry)id
-- unique identifier (points to profile URL)chamber
-- chamber (1: National or 2: States)name
-- full namesex
-- genderborn
-- year of birthparty
-- political partyconstituency
-- constituency (as a Wikipedia Francophone handle)nyears
-- time in office since legislature 44, in years
Note: the code uses French party abbreviations and English party names. Three regional party branches are grouped with larger formations: the single sponsor for Alternative de Gauche in Geneva is grouped with the Parti Suisse du Travail, the Greens from Bern (Grünes Bündnis) and Zoug (Alternative Canton de Zoug) are grouped with the Swiss Federation of Green Parties, and the branches of the Christian Social Party in Obwalden and Wallis are grouped with their main party.