Explorar el Código

change to bar_plot_fractions

genderequality-alternative
JosuaKugler hace 4 años
padre
commit
0597f68694
Se han modificado 1 ficheros con 15 adiciones y 3 borrados
  1. +15
    -3
      vignettes/genderequality.Rmd

+ 15
- 3
vignettes/genderequality.Rmd Ver fichero

@@ -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}



Cargando…
Cancelar
Guardar