draw_majoritythreshold: Draw majority threshold

Description Usage Arguments Author(s) Examples

Description

Draw majority threshold

Usage

1
2
3
draw_majoritythreshold(n = NULL, label = TRUE, type = c("horseshoe",
  "semicircle", "opposing_benches"), linecolour = "black",
  linesize = 1, linetype = 2, linealpha = 1)

Arguments

n

The number of seats required for a majority

label

A logical variable for labelling majority threshold. Defaults to TRUE.

type

Type of parliament (horseshoe, semicircle,opposing benches)

linecolour

The colour of the majority line. Defaults to gray.

linesize

The size of the line. Defaults to 1.

linetype

The style of the line. Defaults to 2, or a dashed line.

linealpha

Set the transparency of the line. Defaults to 1.

Author(s)

Zoe Meers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data <- election_data[
  election_data$country == "USA" &
  election_data$house == "Representatives" &
  election_data$year == "2016",
]
usa_data <- parliament_data(
  election_data = data,
  type = "semicircle",
  party_seats = data$seats,
  parl_rows = 8
)
ggplot2::ggplot(usa_data, ggplot2::aes(x, y, colour = party_long)) +
  geom_parliament_seats() +
  draw_majoritythreshold(
    n = 218,
    label = TRUE,
    type = 'semicircle'
  ) +
  theme_ggparliament()

ggparliament documentation built on May 2, 2019, 3:35 p.m.