geom_highlight_government: Highlight governments or parties in control of the...

Description Usage Arguments Author(s) Source Examples

Description

Highlight governments or parties in control of the legislature by encircling the points.

Usage

1
geom_highlight_government(expr, colour, size, shape, stroke)

Arguments

expr

Expr refers to the observation that you wish to highlight.

colour

Colour of the highlight

size

Size of highlighter

shape

Shape of highlight

stroke

Size of stroke shape

Author(s)

Zoe Meers

Source

https://yutani.rbind.io/post/2017-11-07-ggplot-add/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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() +
  geom_highlight_government(government == 1) +
  theme_ggparliament()

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