/bundestag

Inspecting and modelling Bundestag (german federal parliament) voting behavior

Primary LanguageHTMLApache License 2.0Apache-2.0

"Namentliche Abstimmungen" in the Bundestag

How do individual members of the federal German parliament (Bundestag) vote in "Namentliche Abstimmungen" (roll call votes)? How does the individual align with the different political parties? And how may the members vote on upcoming bills? All this here.

Binder Tests codecov

This project was created out of curiosity and purely for entertainment.

What you can find here:

  • tools do to process data from the sources mentioned below
  • some analysis on the voting behavior of members of parliament
  • a totally serious attempt to predict votes of members of parliament in upcoming roll call votes.

Data sources

The German parliament makes roll call votes available as XLSX / XLS files (and PDFs ¯\_(ツ)_/¯ ) here: https://www.bundestag.de/parlament/plenum/abstimmung/liste.

The NGO abgeordnetenwatch provides an open API for a variety of related data. They also provide a great way of inspecting the voting behavior of members of parliament and their (non-)responses to question asked by the public.

Analysis highlight - Embedded members of parliament

As a side effect of trying to predict the vote of individual members of parliament we can obtain embeddings for each member. Doing so for the 2017-2021 legislative period, we find that they cluster into governing coalition (CDU/CSU & SPD) and the opposition:

If you want to see more check out this site or this notebook.

How to install

git clone https://github.com/eschmidt42/bundestag
cd bundestag
make venv
make install-dev

How to use

Jupyter notebooks

The bundestag cli

A tool to assist with the data processing.

For an overview over commands run

bundestag --help

To download data from abgeordnetenwatch, for a specific legislature id

bundestag download abgeordnetenwatch 132

To transform the downloaded data run

bundestag transform abgeordnetenwatch 132

To find out the legislature id for the current Bundestag, visit abgeordnetenwatch.de and click on the "Open Data" button at the bottom of the page.

To download prepared raw and transformed data from huggingface run

bundestag download huggingface