Improve genderequality
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
# for usage see the example at the end
|
|
||||||
|
|
||||||
#' Parse xml records
|
#' Parse xml records
|
||||||
#'
|
#'
|
||||||
#' Creates a list of tibbles containing relevant information from all records
|
#' Creates a list of tibbles containing relevant information from all records
|
||||||
|
|||||||
@@ -91,12 +91,10 @@ text %>%
|
|||||||
gender <- tibble(speaker = names,
|
gender <- tibble(speaker = names,
|
||||||
gender = gender)
|
gender = gender)
|
||||||
|
|
||||||
|
|
||||||
speaker %>%
|
speaker %>%
|
||||||
unite("speaker", vorname, nachname, sep = " ") %>%
|
unite("speaker", vorname, nachname, sep = " ") %>%
|
||||||
right_join(gender, by = "speaker") ->
|
right_join(gender, by = "speaker") ->
|
||||||
speaker_with_gender
|
speaker_with_gender
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#Analyse
|
#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}
|
```{r}
|
||||||
|
|
||||||
speeches %>%
|
speeches %>%
|
||||||
@@ -197,7 +196,7 @@ speeches %>%
|
|||||||
mutate(relative2=relative/sum(relative)) ->
|
mutate(relative2=relative/sum(relative)) ->
|
||||||
plot3
|
plot3
|
||||||
```
|
```
|
||||||
|
At first lets take a look at the absolute difference in the amount of speeches by the two sexes.
|
||||||
```{r}
|
```{r}
|
||||||
barplot(plot3$absolute2,
|
barplot(plot3$absolute2,
|
||||||
ylab = "amount of speeches",
|
ylab = "amount of speeches",
|
||||||
@@ -208,7 +207,7 @@ barplot(plot3$absolute2,
|
|||||||
font.main = 4,
|
font.main = 4,
|
||||||
cex.axis = 0.7)
|
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}
|
```{r}
|
||||||
barplot(plot3$relative2,
|
barplot(plot3$relative2,
|
||||||
ylab = "amount of speeches",
|
ylab = "amount of speeches",
|
||||||
|
|||||||
Reference in New Issue
Block a user