Parcourir la source

Improve genderequality

genderequality-alternative
Leon Burgard il y a 4 ans
Parent
révision
0f07b002e6
2 fichiers modifiés avec 3 ajouts et 6 suppressions
  1. +0
    -2
      R/parse.R
  2. +3
    -4
      vignettes/genderequality.Rmd

+ 0
- 2
R/parse.R Voir le fichier

@@ -1,5 +1,3 @@
# for usage see the example at the end

#' Parse xml records
#'
#' Creates a list of tibbles containing relevant information from all records


+ 3
- 4
vignettes/genderequality.Rmd Voir le fichier

@@ -91,12 +91,10 @@ text %>%
gender <- tibble(speaker = names,
gender = gender)


speaker %>%
unite("speaker", vorname, nachname, sep = " ") %>%
right_join(gender, by = "speaker") ->
speaker_with_gender

```

#Analyse
@@ -178,6 +176,7 @@ 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}

speeches %>%
@@ -197,7 +196,7 @@ speeches %>%
mutate(relative2=relative/sum(relative)) ->
plot3
```
At first lets take a look at the absolute difference in the amount of speeches by the two sexes.
```{r}
barplot(plot3$absolute2,
ylab = "amount of speeches",
@@ -208,7 +207,7 @@ barplot(plot3$absolute2,
font.main = 4,
cex.axis = 0.7)
```
Since there are more men represented in the German Bundestag, we now consider the relative proportions of speeches, depending on the ratio of men and women.
```{r}
barplot(plot3$relative2,
ylab = "amount of speeches",


Chargement…
Annuler
Enregistrer