Learn R Programming

flexclust (version 1.3-4)

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 grep for the corresponding state(s), see examples.

Format

btw200x are data frames with 299 rows (corresponding to constituencies) and 17 columns. All columns except state are numeric.
state:
factor, the 16 German federal states.
eligible:
number of citizens eligible to vote.
votes:
number of eligible citizens who did vote.
invalid1, invalid2:
number of invalid first and second votes (see details below).
valid1, valid2:
number of valid first and second votes.
SPD1, SPD2:
number of first and second votes for the Social Democrats.
UNION1, UNION2:
number of first and second votes for CDU/CSU, the conservative Christian Democrats.
GRUENE1, GRUENE2:
number of first and second votes for the Green Party.
FDP1, FDP2:
number of first and second votes for the Liberal Party.
LINKE1, LINKE2:
number of first and second votes for the Left Party (PDS in 2002).
Missing values indicate that a party did not candidate in the corresponding constituency.

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