Learn R Programming

flexclust (version 1.3-3)

bundestag: German Parliament Election Data

Description

Results of the elections 2002, 2005 or 2009 for the German Bundestag, the first chamber of the German parliament.

Usage

data(btw2002)
data(btw2005)
data(btw2009)
bundestag(year, second=TRUE, percent=TRUE, nazero=TRUE, state=FALSE)

Arguments

year
numeric or character, year of the election.
second
logical, return second or first votes?
percent
logical, return percentages or absolute numbers?
nazero
logical, convert NAs to 0?
state
logical or character. If TRUE then only column state from the corresponding data frame is returned, and all other arguments are ignored. If character, then it is used as pattern to g

German Federal Elections

Half of the Members of the German Bundestag are elected directly from Germany's 299 constituencies, the other half on the parties' state lists. Accordingly, each voter has two votes in the elections to the German Bundestag. The first vote, allowing voters to elect their local representatives to the Bundestag, decides which candidates are sent to Parliament from the constituencies.

The second vote is cast for a party list. And it is this second vote that determines the relative strengths of the parties represented in the Bundestag. At least 598 Members of the German Bundestag are elected in this way. In addition to this, there are certain circumstances in which some candidates win what are known as ``overhang mandates'' when the seats are being distributed.

Details

btw200x are the original data sets. bundestag() is a helper function which extracts first or second votes, calculates percentages (number of votes for a party divided by number of valid votes), replaces missing values by zero, and converts the result from a data frame to a matrix. By default it returns the percentage of second votes for each party, which determines the number of seats each party gets in parliament.

References

Homepage of the Bundestag: http://www.bundestag.de

Examples

Run this code
p02 <- bundestag(2002)
pairs(p02)
p05 <- bundestag(2005)
pairs(p05)
p09 <- bundestag(2009)
pairs(p09)

state <- bundestag(2002, state=TRUE)
table(state)

start.with.b <- bundestag(2002, state="^B")
table(start.with.b)

pairs(p09, col=2-(state=="Bayern"))

Run the code above in your browser using DataLab