Learn R Programming

SciencesPo (version 1.3.9)

dHondt: The D'Hondt Method of Allocating Seats Proportionally

Description

The function calculate the seats allotment in legislative house, given the total number of seats and the votes for each party based on the Victor D'Hondt's method (1878), which is mathematically equivalent to the method proposed by Thomas Jefferson few years before (1792).

Usage

dHondt(parties = NULL, votes = NULL, seats = NULL, ...)

dHondt(parties = NULL, votes = NULL, seats = NULL, ...)

Arguments

parties
A vector containig parties labels or candidates accordingly to the votes vector order.
votes
A vector containing the total number of formal votes received by the parties/candidates.
seats
An integer for the number of seats to be filled (the district magnitude).
...
Additional arguements (currently ignored)

Value

  • A data.frame of length parties containing apportioned integers (seats) summing to seats.

encoding

UTF-8

References

Lijphart, Arend (1994). Electoral Systems and Party Systems: A Study of Twenty-Seven Democracies, 1945-1990. Oxford University Press.

See Also

highestAverages, largestRemainders, hamilton, politicalDiversity.

Examples

Run this code
# Example: 2014 Brazilian election for the lower house in
# the state of Ceara. Coalitions were leading by the
# following parties:

results <- c(DEM=490205, PMDB=1151547, PRB=2449440,
PSB=48274, PSTU=54403, PTC=173151)

dHondt(parties=names(results), votes=results, seats=19)

# The next example is for the state legislative house of Ceara (2014):

votes <- c(187906, 326841, 132531, 981096, 2043217,15061,103679,109830, 213988, 67145, 278267)

parties <- c("PCdoB", "PDT","PEN", "PMDB", "PRB","PSB","PSC", "PSTU", "PTdoB", "PTC", "PTN")

dHondt(parties, votes , seats=42)

Run the code above in your browser using DataLab