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.
This project was created out of curiosity and purely for entertainment.
What you can find here:
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.
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.
git clone https://github.com/eschmidt42/bundestag
cd bundestag
make install-dev-env
bundestag
cliA tool to assist with the data processing.
For an overview over commands run
uv run bundestag --help
To download data from abgeordnetenwatch, for a specific legislature id
uv run bundestag download abgeordnetenwatch 132
To transform the downloaded data run
uv 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 data from bundestag.de
uv run bundestag download bundestag_sheets --do-create-xlsx-uris-json
To transform the downloaded data run
uv run bundestag transform bundestag_sheet --sheet-source=json_file
To download prepared raw and transformed data from huggingface run
uv run bundestag download huggingface
get_xlsx_uris
cliPre-processing cli for bundestag
cli.
uv run get_xlsx_uris run --help
Module for collecting and storing XLSX URIs from Bundestag data sources. Also done with
uv run bundestag download bundestag_sheet --do-create-xlsx-uris-json