Sfoglia il codice sorgente

change to bar_plot_fractions

genderequality-alternative
JosuaKugler 4 anni fa
parent
commit
0597f68694
1 ha cambiato i file con 15 aggiunte e 3 eliminazioni
  1. +15
    -3
      vignettes/genderequality.Rmd

+ 15
- 3
vignettes/genderequality.Rmd Vedi File

@@ -120,10 +120,24 @@ pie +
ylab("")
```

Next we look at the individual distributions between men and women in relation to the individual parties.
Next we look at the individual distributions between men and women in the different fractions.

```{r}
speaker_with_gender %>%
group_by(fraction) %>%
summarize(n = n()) ->
fraction_size

speaker_with_gender %>%
filter(gender=="female") %>%
group_by(fraction) %>%
summarize(n_female = n()) %>%
left_join(fraction_size) %>%
mutate(q = n_female/n) -> women_per_fraction
bar_plot_fractions(women_per_fraction, x_variable=fraction, y_variable=q, title="Frauenanteil nach Partei")
```

```r
speaker_with_gender %>%
select(fraction, gender) %>%
group_by(fraction, gender) %>%
@@ -174,8 +188,6 @@ pie6 <- bp + coord_polar("y", start=0) + ggtitle("SPD") + xlab("") + ylab("")
gridExtra::grid.arrange(pie1,pie2,pie3,pie4,pie5,pie6,nrow=2)
```



Now let's analyze whether there are any differences in the amount of speeches given.
```{r}



Loading…
Annulla
Salva