소스 검색

Improve genderequality

genderequality-alternative
Leon Burgard 4 년 전
부모
커밋
0f07b002e6
2개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. +0
    -2
      R/parse.R
  2. +3
    -4
      vignettes/genderequality.Rmd

+ 0
- 2
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


+ 3
- 4
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",


불러오는 중...
취소
저장