Learn R Programming

flexclust (version 1.1-0)

bundestag: German Parliament Election Data

Description

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

Usage

data(btw2002)
data(btw2005)
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, if TRUE then only column state from the corresponding data frame is returned, and all other arguments are ignored.

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' land 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

btw2002 and btw2005 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)

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

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

Run the code above in your browser using DataLab