geom_emphasize_parliamentarians: Emphasize certain parliamentarians (for example, female...

Description Usage Arguments Author(s) Examples

Description

Emphasize certain parliamentarians (for example, female members of parliament) by increasing transparency on the remaining observations.

Usage

1

Arguments

expr

The observation that you wish to emphasize

Author(s)

Zoe Meers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
)

women_in_congress <- c(1, 0, 0, 1)
number_of_women <- c(23, 218, 133, 61)

usa_data$women <- rep(women_in_congress, number_of_women)

ggplot2::ggplot(usa_data, ggplot2::aes(x, y, colour=party_long)) +
  geom_parliament_seats() +
  geom_emphasize_parliamentarians(women == 1) +
  theme_ggparliament(legend = FALSE) +
  ggplot2::scale_colour_manual(values = usa_data$colour, limits = usa_data$party_long) +
  ggplot2::labs(title = "Women in Congress")

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