Description Usage Arguments Examples
An arc bar diagram that allows for spacing between the individual arc components and spans 180 degrees.
1 2 3 4 |
parties |
A vector of parties that make up the diagram |
shares |
A vector of the parties' member count or proportion of seats in parliament |
party_colors |
A vector of colors mapped to each party |
type |
The type of shares passed. Absolute for counts, proportion for proportions. Defaults to absolute |
border_color |
Border color of the arc. Defaults to black |
text_total |
Boolean indicator for whether to display the total number of members inside the diagram. Defaults to TRUE |
autosort |
Sort the parties from most to least members. Defaults to FALSE. |
rad_inner |
Limiting inner radius of the diagram. Defaults to 1.5 |
rad_outer |
Limiting outer radius of the diagram. Defaults to 3 |
arc_n |
Number of points used to draw arc polygons for each party Defaults to 360 |
sep |
Total spacing between parties as a proportion of pi. Defaults to 0.05 |
1 2 3 4 5 6 7 8 | # Generate Data
# Generate Data
bt <- data.frame(
parties = c("CDU", "CSU", "SPD", "AfD", "FDP", "Linke", "Gruene", "Fraktionslos"),
seats = c(200, 46, 153, 92, 80, 69, 67, 2),
colors = c("black", "blue", "red", "lightblue", "yellow","purple", "green", "grey"),
stringsAsFactors = FALSE)
ggplot_parliament2(bt$parties, bt$seats, bt$colors, sep = 0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.