add plots in genderequality and clean up hitlercomparison

This commit is contained in:
2021-08-08 22:35:08 +02:00
parent 1546f84d80
commit 1db9e3f59a
2 changed files with 54 additions and 59 deletions
+16 -2
View File
@@ -119,8 +119,22 @@ all_words %>% group_by(Worte) %>% summarize(n = sum(n), part= sum(n)/total) -> a
Now we want to extract the words that are more frequently used by a specific fraction.
```{r}
afd_words %>% transmute(freq, fraction_n = n) %>% left_join(all_words) %>% transmute(fraction_freq = freq, total_freq = part, fraction_n, total_n = n, rel_quotient = fraction_freq/total_freq, abs_quotient = fraction_n/total_n) %>% arrange(-abs_quotient, -fraction_n) %>% filter(rel_quotient > 1) -> afd_high_frequent
select(afd_high_frequent, fraction_n, total_n, abs_quotient, rel_quotient) %>% filter(total_n > 80)
afd_words %>%
transmute(freq, fraction_n = n) %>%
left_join(all_words) %>%
transmute(
fraction_freq = freq,
total_freq = part,
fraction_n,
total_n = n,
rel_quotient = fraction_freq/total_freq,
abs_quotient = fraction_n/total_n) %>%
arrange(-abs_quotient, -fraction_n) %>%
filter(rel_quotient > 1) ->
afd_high_frequent
select(afd_high_frequent, fraction_n, total_n, abs_quotient, rel_quotient) %>%
filter(total_n > 80)
afdundfraktionslos_words %>% transmute(freq, fraction_n = n) %>% left_join(all_words) %>% transmute(fraction_freq = freq, total_freq = part, fraction_n, total_n = n, rel_quotient = fraction_freq/total_freq, abs_quotient = fraction_n/total_n) %>% arrange(-abs_quotient, -fraction_n) %>% filter(rel_quotient > 1) -> afdundfraktionslos_high_frequent
select(afdundfraktionslos_high_frequent, fraction_n, total_n, abs_quotient, rel_quotient) %>% filter(total_n > 80)