Bill cosponsorship networks in the Hungarian Parliament.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
build.r
comm.r
data.r
functions.r
load.r
make.r
parties.r
raw-bill-lists.zip

README.md

This repository contains code to build cosponsorship networks from bills passed in the Hungarian Parliament.

HOWTO

Replicate by running make.r in R.

The data.r script downloads information on sponsors only: you will need to download the raw bill indexes manually, because I was too lazy to get a grip of the dynamic URL generation scheme to scrape only five pages. Recent versions of the files are included in the repository for convenience.

The procedure to get the bill indexes manually is as follows:

  • Go to this index of all legislation.
  • Click the first legislative cycle.
  • Set "Típus" to "törvényjavaslat".
  • Click "Lekérdezés" to get the index.
  • Save and repeat for each cycle.

The files go into raw/bill-lists. The filenames should be of the form 1998-2002 or of the form 2014- for the ongoing legislature. The zipped version of the files included in the repository will expand to the right filenames and folder hierarchy.

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

  • legislature -- legislature years
  • ref -- bill id (of the form "T/123")
  • url -- URL
  • title -- short title
  • authors -- sponsors list, as text, or "GOV" for government bills
  • status -- bill status (always lezárt, closed)
  • n_au -- total number of sponsors

Sponsors

The sponsors data has one row per legislature in which the sponsor sat.

  • legislature -- legislature years
  • url -- profile URL, shortened
  • name -- name (in Western order, cleaned up from "Dr." titles)
  • photo -- photo dummy (0/1), to indicate if a sponsor photo exists
  • party -- party affiliation, abbreviated
  • partyname -- party affiliation, full name (in Hungarian)
  • sex -- gender (F/M), imputed from first names
  • mandate -- number of years in office when legislature started (int)
  • constituency -- constituency, stored as the string to its Wikipedia English entry