Description Usage Arguments Author(s) Examples
Parliament seats The parliament seats geom is used for plotting data from parliament_data()
1 2 3 |
mapping |
Mapping the aesthetics (the x and y coordinates, as well as the colour of each political party). |
data |
The parliament_data data frame. |
stat |
"identity" |
position |
"identity" |
na.rm |
If 'FALSE', the default, missing values are removed with a warning. If 'TRUE', missing values are silently removed. |
size |
Size of the point |
show.legend |
If 'TRUE', print legend. If 'FALSE' do not print legend. |
inherit.aes |
Inherit aes from other ggplot2 functions. |
Zoe Meers
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 = x, y = y, colour = party_long)) +
geom_parliament_seats() +
theme_ggparliament()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.