-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcourse-irl.qmd
More file actions
388 lines (326 loc) · 13.5 KB
/
course-irl.qmd
File metadata and controls
388 lines (326 loc) · 13.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
---
title: "Stats and Data Sci in real life"
editor_options:
chunk_output_type: console
---
## Interesting Articles
- *The Age That Women Have Babies: how A Gap Divides America* Source: [New York Times Upshot](https://nyti.ms/2Obvf8RLinks); pdf version [here](documents/articles/01_nytimes_upshot.pdf).
- *The Story of Moneyball Proves Importance of Both Big Data and Big Ideas* Source: [UW Data Science Team](https://datasciencedegree.wisconsin.edu/blog/moneyball-proves-importance-big-data-big-ideas/)
- *Why good science is good business* Source: [significance](documents/articles/03_good_science.pdf)
- *Police are using software to predict crime. Is it a 'holy grail' or biased against minorities?* Source: [Washington Post](documents/articles/04_data_policing.pdf)
- *We Gave Four Good Pollsters the Same Raw Data. They Had Four Different Results.* Source: [New York Times](documents/article/05_pollster.pdf)
- *Science Won't Settle The Mammogram Debate* Source: [fivethirtyeight](documents/article/06_mammogram.pdf)
- *You Can't Trust What You Read About Nutrition* Source: [fivethirtyeight](documents/article/07_nutrition_research.pdf)
## What student's say? (Winter 2023 Survey data)
```{r}
#| echo: false
#| message: false
#| warning: false
library(ggplot2)
library(dplyr)
#library(fmsb)
library(patchwork)
survey1 <- read.csv("documents/course-survey1.csv")[,c(1, 6, 8, 10, 12, 14, 20, 22, 24)]
colnames(survey1) <- c("quarter", "difficulty_content", "demands_activity", "time_spent", "lecture_slides", "website", "teaching_style", "difficulty_exam", "fairness_exam")
survey1 <- survey1 %>%
mutate(
fairness_exam = factor(fairness_exam,
levels = c("1 - Very unfair (how should I know this)",
"2 - unfair",
"3 - Neither fair nor unfair",
"4 - fair",
"5 - Very fair (all topics were covered)"),
labels = c("1 - Very unfair", "2 - Unfair", "3", "4 - Fair", "5 - Very fair"))
)
p_content <- survey1 %>%
count(difficulty_content) %>%
#mutate(difficulty = c("Very easy", "", "", "", "Very difficult")) %>%
ggplot(aes(x = difficulty_content, y = n)) +
geom_col(fill = "cyan3") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Content Difficulty") +
#geom_text(aes(label = difficulty), nudge_y = 3) +
scale_y_continuous(expand = c(0, 0)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
p_exam <- survey1 %>%
count(difficulty_exam) %>%
#mutate(difficulty = c("Very easy", "", "", "", "Very difficult")) %>%
ggplot(aes(x = difficulty_exam, y = n)) +
geom_col(fill = "coral1") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Exam Difficulty") +
#geom_text(aes(label = difficulty), nudge_y = 3) +
scale_y_continuous(expand = c(0, 0)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
#mutate(difficulty = c("Very unfair", "", "", "", "Very fair")) %>%
p_fair <- ggplot(survey1, aes(x = fairness_exam)) +
geom_bar(fill = "goldenrod1") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Exam Fairness") +
scale_y_continuous(expand = c(0, 0))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
# time <- survey1 %>%
# count(time_spent)
#
# time_plot <- tibble(`0-1 hours` = c(max(time$n), 0 ,time$n[1]),
# `1-3 hours` = c(max(time$n), 0 ,time$n[2]),
# `3-5 hours` = c(max(time$n), 0 ,time$n[3]),
# `5-7 hours` = c(max(time$n), 0 ,time$n[4]),
# `7+ hours` = c(max(time$n), 0 ,time$n[5]))
#
# radarchart(time_plot)
```
```{r}
#| echo: false
#| message: false
p_content + p_exam + p_fair +
plot_annotation(title = "Chapters 1 - 4",
theme = theme(plot.title = element_text(
hjust = 0.5, size = 24, face = "bold")))
```
```{r}
#| echo: false
# Survey 2
survey2 <- read.csv("documents/course-survey2.csv")[,c(1, 6, 8, 10, 12, 14, 16, 18, 20, 22)]
colnames(survey2) <- c("quarter", "classes_missed", "exam_day", "difficulty_content", "demands_activity", "time_spent", "lecture_slides", "website", "difficulty_exam", "fairness_exam")
survey2 <- survey2 %>%
mutate(
fairness_exam = factor(fairness_exam,
levels = c("1 - Very unfair (how should I know this)",
"2 - unfair",
"3 - Neither fair nor unfair",
"4 - fair",
"5 - Very fair (all topics were covered)"),
labels = c("1 - Very unfair", "2 - Unfair", "3", "4 - Fair", "5 - Very fair"))
)
p_content2 <- survey2 %>%
count(difficulty_content) %>%
#mutate(difficulty = c("Very easy", "", "", "", "Very difficult")) %>%
ggplot(aes(x = difficulty_content, y = n)) +
geom_col(fill = "cyan3") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Content Difficulty") +
#geom_text(aes(label = difficulty), nudge_y = 3) +
scale_y_continuous(expand = c(0, 0)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
p_exam2 <- survey2 %>%
count(difficulty_exam) %>%
#mutate(difficulty = c("Very easy", "", "", "", "Very difficult")) %>%
ggplot(aes(x = difficulty_exam, y = n)) +
geom_col(fill = "coral1") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Exam Difficulty") +
#geom_text(aes(label = difficulty), nudge_y = 3) +
scale_y_continuous(expand = c(0, 0)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
#mutate(difficulty = c("Very unfair", "", "", "", "Very fair")) %>%
p_fair2 <- survey2 %>%
filter(!is.na(fairness_exam)) %>%
count(fairness_exam) %>%
ggplot(aes(x = fairness_exam, y = n)) +
geom_col(fill = "goldenrod1") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Exam Fairness") +
scale_y_continuous(expand = c(0, 0))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
```
```{r}
#| echo: false
#| message: false
p_content2 + p_exam2 + p_fair2 +
plot_annotation(title = "Chapters 5 - 9.1",
theme = theme(plot.title = element_text(
hjust = 0.5, size = 24, face = "bold")))
```
```{r}
#| echo: false
# Survey 3
survey3 <- read.csv("documents/course-survey3.csv")[,c(1, 6, 8, 10, 12, 14, 16, 18, 20, 22)]
colnames(survey3) <- c("quarter", "classes_missed", "exam_day", "difficulty_content", "demands_activity", "time_spent", "lecture_slides", "website", "difficulty_exam", "fairness_exam")
survey3 <- survey3 %>%
filter(difficulty_content != "") %>%
mutate(
fairness_exam = factor(fairness_exam,
levels = c("1 - Very unfair (how should I know this)",
"2 - unfair",
"3 - Neither fair nor unfair",
"4 - fair",
"5 - Very fair (all topics were covered)"),
labels = c("1 - Very unfair", "2 - Unfair", "3", "4 - Fair", "5 - Very fair"))
)
p_content3 <- survey3 %>%
filter(!is.na(difficulty_content)) %>%
count(difficulty_content) %>%
ggplot(aes(x = difficulty_content, y = n)) +
geom_col(fill = "cyan3") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Content Difficulty") +
scale_y_continuous(expand = c(0, 0)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
p_exam3 <- survey3 %>%
filter(!is.na(difficulty_exam)) %>%
count(difficulty_exam) %>%
ggplot(aes(x = difficulty_exam, y = n)) +
geom_col(fill = "coral1") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Exam Difficulty") +
scale_y_continuous(expand = c(0, 0)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
p_fair3 <- survey3 %>%
filter(!is.na(fairness_exam)) %>%
count(fairness_exam) %>%
ggplot(aes(x = fairness_exam, y = n)) +
geom_col(fill = "goldenrod1") +
theme_minimal() +
labs(x = NULL,
y = NULL,
title = "Exam Fairness") +
scale_y_continuous(expand = c(0, 0))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
```
```{r}
#| echo: false
#| message: false
p_content3 + p_exam3 + p_fair3 +
plot_annotation(title = "Chapters 9.2 - 12",
theme = theme(plot.title = element_text(
hjust = 0.5, size = 24, face = "bold")))
```
```{r}
#| echo: false
#| message: false
# Exam day wrangling
tmp <- survey2 %>%
select(exam_day) %>%
count(exam_day) %>%
mutate(prop = n/sum(n),
exam_day = factor(exam_day,
levels = c("Friday", "Wednesday", "Monday")),
y = rep("exam", 3),
label = paste0(exam_day,"\n",scales::percent(prop))) %>%
arrange(exam_day)
pos1 <- tmp[tmp$exam_day == "Monday",]$prop/2
pos2 <- tmp[tmp$exam_day == "Monday",]$prop + tmp[tmp$exam_day == "Wednesday",]$prop/2
pos3 <- 1 - tmp[tmp$exam_day == "Friday",]$prop/2
tmp$pos <- c(pos3, pos2, pos1)
p_exam_day <- ggplot(tmp, aes(x = prop, y = y, fill = exam_day)) +
geom_col(position = "fill", width = 0.3) +
scale_fill_manual(NULL,
values = c("cyan3","coral1", "goldenrod1")) +
theme_void() +
labs(x = NULL,
y = NULL,
title = "Preferred Exam Day") +
geom_text(aes(x = pos, label = label)) +
theme(legend.position = "none",
plot.title = element_text(hjust = 0.5))
# Website
tmp2 <- survey2 %>%
select(website) %>%
count(website) %>%
mutate(prop = n/sum(n),
website = factor(website,
levels = c("Don't care either way",
"Hate it - go back to Canvas",
"Love it - organized and easy to use"),
labels = c("Don't care", "Hate it", "Love it")),
y = rep("y", 3),
label = paste0(website,"\n",scales::percent(prop))) %>%
arrange(website)
pos1 <- tmp2[tmp2$website == "Love it",]$prop/2
pos2 <- tmp2[tmp2$website == "Love it",]$prop + tmp2[tmp2$website == "Hate it",]$prop/2
pos3 <- 1 - tmp2[tmp2$website == "Don't care",]$prop/2
tmp2$pos <- c(pos3, pos2, pos1)
p_website <- ggplot(tmp2, aes(x = prop, y = y, fill = website)) +
geom_col(position = "fill", width = 0.3) +
scale_fill_manual(NULL,
values = c("cyan3","coral1", "goldenrod1")) +
theme_void() +
labs(x = NULL,
y = NULL,
title = "Thoughts on Website") +
geom_text(aes(x = pos, label = label)) +
theme(legend.position = "none",
plot.title = element_text(hjust = 0.5))
##########################################################
# teaching style
tmp <- survey1 %>%
select(teaching_style) %>%
count(teaching_style) %>%
mutate(prop = n/sum(n),
teaching_style = factor(teaching_style,
levels = c("Doesn't matter to me.",
"Would prefer full lecture (completely on your own for activity outside of class)",
"I enjoy class as is (Lecture, activity, some solutions)",
"Would prefer fully flipped! (Watch lecture videos outside of class and spend entire time working on activity.)"),
labels = c("Don't care",
"Lecture only",
"Blended",
"Fully flipped")),
y = rep("y", 4),
label = paste0(teaching_style,"\n",scales::percent(prop))) %>%
arrange(teaching_style)
tmp$label[1] <- ""
pos1 <- tmp[tmp$teaching_style == "Fully flipped",]$prop/2
pos2 <- tmp[tmp$teaching_style == "Fully flipped",]$prop + tmp[tmp$teaching_style == "Blended",]$prop/2
pos3 <- tmp[tmp$teaching_style == "Fully flipped",]$prop + tmp[tmp$teaching_style == "Blended",]$prop + tmp[tmp$teaching_style == "Lecture only",]$prop/2
pos4 <- 1 - tmp[tmp$teaching_style == "Don't care",]$prop/2
tmp$pos <- c(pos4, pos3, pos2, pos1)
p_style <- ggplot(tmp, aes(x = prop, y = y, fill = teaching_style)) +
geom_col(position = "fill", width = 0.3) +
scale_fill_manual(NULL,
values = c("gray", "cyan3","coral1", "goldenrod1")) +
theme_void() +
labs(x = NULL,
y = NULL,
title = "Preferred Teaching Style") +
geom_text(aes(x = pos, label = label)) +
theme(legend.position = "none",
plot.title = element_text(hjust = 0.5))
p_exam_day/ p_website/ p_style +
plot_annotation(title = "Course Structure",
theme = theme(plot.title = element_text(
hjust = 0.5, size = 24, face = "bold")))
```
<br>
```{r}
#| echo: false
ggplot() +
theme_void() +
labs(title = "Student comments taken completely out of context") +
theme(plot.title = element_text(
hjust = 0.5, size = 14, face = "bold")) +
scale_y_continuous(limits = c(0, 10)) +
scale_x_continuous(limits = c(0, 10)) +
annotate("text", x = 2, y = 8,
label = "...surprisingly fun...",
color = "steelblue", angle = 20, size = 7) +
annotate("text", x = 3.5, y = 5.5,
label = "...Prof. Sass is the best...",
color = "darkorchid4", angle = 0, size = 5) +
annotate("text", x = 6, y = 4,
label = "...not as bad as I thought it would be...",
color = "darkseagreen3", angle = 10, size = 6) +
annotate("text", x = 3, y = 2,
label = "...Campuswire saved my life...",
color = "orange2", angle = -20, size = 5) +
annotate("text", x = 8, y = 7,
label = "...go to class...",
color = "indianred", angle = -15, size = 7)
```