improve vignette
This commit is contained in:
+18
@@ -11,3 +11,21 @@ join_redner <- function(tb, res, fraktion_only = F) {
|
||||
if (fraktion_only) select(joined, "fraktion")
|
||||
else joined
|
||||
}
|
||||
|
||||
party_colors <- c(
|
||||
SPD="#DF0B25",
|
||||
"CDU/CSU"="#000000",
|
||||
AfD="#1A9FDD",
|
||||
"AfD&Fraktionslos"="#1A9FDD",
|
||||
"DIE LINKE"="#BC3475",
|
||||
"BÜNDNIS 90 / DIE GRÜNEN"="#4A932B",
|
||||
FDP="#FEEB34",
|
||||
Fraktionslos="#FEEB34"
|
||||
)
|
||||
|
||||
#' @export
|
||||
bar_plot_fraktionen <- function(tb) {
|
||||
ggplot(tb, aes(x = reorder(fraktion, -n), y = n, fill = fraktion)) +
|
||||
scale_fill_manual(values = party_colors) +
|
||||
geom_bar(stat = "identity")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user