btmembers: R package to import data on all members of the Bundestag since 1949

The Bundestag distributes biographical and election data on all members of the parliament since 1949 in the form of an XML file. This data, however, can be difficult to work with because XML files store information in an arbitrary number of dimensions. btmembers downloads the file “Stammdaten aller Abgeordneten seit 1949 im XML-Format” from the Bundestag website and converts it to either (a) four data frames nested into a list (retaining all the information of the original XML file) or (b) a single, condensed data frame, where units of analysis are member-terms.

Other demonstrations in R

How to apply Oesch’s class schema on data from the European Social Survey (ESS) using R


Daniel Oesch (University of Lausanne) has developed a schema of social classes, which he discusses and applies in different publications. In this vignette, I show how to apply Oesch’s class schema on data from the European Social Survey (ESS) using R.

Identifying East and West Germans in the European Social Survey: A demonstration in R


This vignette describes the technique I have developed in my paper on “Generations and Protest in Eastern Germany.” It follows a political socialization approach and accounts for migration in Germany.

Using multiple imputation to improve the harmonization of repeated cross-national surveys


This vignette introduces a technique for coping with the problem of systematically missing data in longitudinal social and political surveys. I present a demonstration with the R mice package and data from the European Values Study.