From 0f07b002e6b2c742ef3be40fcb70e44dd2db30d3 Mon Sep 17 00:00:00 2001 From: Leon Burgard Date: Sun, 8 Aug 2021 00:16:05 +0200 Subject: [PATCH] Improve genderequality --- R/parse.R | 2 -- vignettes/genderequality.Rmd | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/R/parse.R b/R/parse.R index f656b2c..7785995 100644 --- a/R/parse.R +++ b/R/parse.R @@ -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 diff --git a/vignettes/genderequality.Rmd b/vignettes/genderequality.Rmd index c7253f6..1b76e34 100644 --- a/vignettes/genderequality.Rmd +++ b/vignettes/genderequality.Rmd @@ -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",