Skip to content

Commit ee02016

Browse files
Add wordcloud
1 parent a0f17bc commit ee02016

3 files changed

Lines changed: 66 additions & 1 deletion

File tree

evaluations/all_courses_so_far/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Average confidences per course per day
66

7-
![](confidences_per_course_per_day.png)
7+
![Average confidences per course per day](confidences_per_course_per_day.png)
88

99
## [Comments per course per day](comments_per_course_per_day.md)
1010

@@ -89,3 +89,10 @@
8989
| 9| 4|I didn't fill the other evaluations and day4 i watched as videos so i will comment for all days here: Pedro has some amazing material and is a great lecturer but i am not intrested in parallel programming. Bjorn was mostly ok but maybe a bit fast (packages). Rachel should have more advanced material, we are smarter than he thinks. Brigitte i didn't get through the sessions as batch is not intresting but i need it until you install ondemand everywhere. Also the day4 recordings was not up until sunday!!!!! Jayant ok good presentations |
9090

9191
<!-- markdownlint-enable MD013 -->
92+
93+
## Wordcloud
94+
95+
A wordcloud of all the words in the comments.
96+
97+
![Wordcloud](wordcloud.png)
98+

evaluations/all_courses_so_far/analyse.R

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,61 @@ comments_per_day$comment
123123
readr::write_csv(comments_per_day, "comments_per_course_per_day.csv")
124124
text <- knitr::kable(comments_per_day)
125125
readr::write_lines(text, "comments_per_course_per_day.md")
126+
127+
128+
comments_per_day$comment
129+
130+
# Adapted from https://stackoverflow.com/a/51316814/3364162
131+
library(tidyverse)
132+
text_string <- paste0(comments_per_day$comment, collapse = " ")
133+
testthat::expect_equal(1, length(text_string))
134+
stop_words <- c(
135+
"a",
136+
"and",
137+
"for",
138+
"the",
139+
"to",
140+
"i",
141+
"it",
142+
"of",
143+
"in",
144+
"that",
145+
"was",
146+
"with",
147+
"not",
148+
"we",
149+
"this",
150+
"would",
151+
"could",
152+
"as",
153+
"have",
154+
"is",
155+
"you",
156+
"from",
157+
"some",
158+
"so",
159+
"up",
160+
"maybe",
161+
"do",
162+
"are",
163+
"were",
164+
"on",
165+
"at", "am", "us", "only",
166+
"can", "until", "my", "set", "each", "if", "along",
167+
"me", "been", "no",
168+
"but", "or", "about", "bit", "will",
169+
"too", "had", "just", "still", "then", "an",
170+
"very", "did", "has", "also",
171+
"be"
172+
) # just a sample list of words I don't care about
173+
word_frequencies <- data_frame(text = text_string) %>%
174+
mutate(text = tolower(text)) %>%
175+
mutate(text = str_remove_all(text, '[[:punct:]]')) %>%
176+
mutate(tokens = str_split(text, "\\s+")) %>%
177+
unnest(cols = c(tokens)) %>%
178+
count(tokens) %>%
179+
filter(!tokens %in% stop_words) %>%
180+
mutate(freq = n / sum(n)) %>%
181+
arrange(desc(n))
182+
183+
wordcloud2::wordcloud2(word_frequencies)
350 KB
Loading

0 commit comments

Comments
 (0)