-
Notifications
You must be signed in to change notification settings - Fork 1
/
2024-06-10-spring-geospatial.qmd
352 lines (298 loc) · 10.8 KB
/
2024-06-10-spring-geospatial.qmd
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
---
title: "Spring 2024 Geospatial Workshop Survey Responses"
editor: visual
format:
html:
code-fold: true
message: false
df-print: kable
---
## Number of responses
```{r}
#| message: false
library(tidyverse)
library(bslib)
library(shiny)
library(bsicons)
source("scripts/helper_functions.R")
# list of workshop IDs to filter results
workshops <- c("2024-06-10-ucsb-geospatial")
results <- read_csv("data-joined/all_workshops.csv") %>%
filter(workshop %in% workshops)
# Fix comma separator
results <- results %>%
mutate(findout_select.pre = str_replace_all(
findout_select.pre,
"Twitter, Facebook, etc.",
"Twitter; Facebook; etc."))
pre_survey <- results %>%
select(ends_with(".pre"))
post_survey <- results %>%
select(ends_with(".post"))
n_pre <- sum(apply(post_survey, 1, function(row) all(is.na(row))))
n_post <- sum(apply(pre_survey, 1, function(row) all(is.na(row))))
n_total <- nrow(results)
n_both <- nrow(results) - n_pre - n_post
layout_columns(
value_box(
title = "Total responses", value = n_total, ,
theme = NULL, showcase = bs_icon("people-fill"), showcase_layout = "left center",
full_screen = FALSE, fill = TRUE, height = NULL
),
value_box(
title = "Both pre- and post-", value = n_both, , theme = NULL,
showcase = bs_icon("arrows-expand-vertical"), showcase_layout = "left center",
full_screen = FALSE, fill = TRUE, height = NULL
),
value_box(
title = "Only pre-workshop", value = n_pre, ,
theme = NULL, showcase = bs_icon("arrow-left-short"), showcase_layout = "left center",
full_screen = FALSE, fill = TRUE, height = NULL
),
value_box(
title = "Only post-workshop", value = n_post, , theme = NULL,
showcase = bs_icon("arrow-right-short"), showcase_layout = "left center",
full_screen = FALSE, fill = TRUE, height = NULL
)
)
```
## Departments
```{r}
depts <- results %>% select(dept_select.pre) %>%
separate_rows(dept_select.pre, sep=",") %>%
mutate(dept_select.pre = str_trim(dept_select.pre)) %>%
count(dept_select.pre, name = "count") %>%
mutate(percent = (count / (n_total - n_post)) * 100,
text = sprintf("%.0f (%.0f%%)", count, percent))
ggplot(depts, aes(y=reorder(dept_select.pre, count), x=count)) +
geom_col() +
geom_label(aes(label = text, hjust = -0.1),
size = 3) +
labs(x = "# respondents", y = element_blank()) +
theme_minimal() +
theme(
panel.grid.minor = element_blank(),
panel.grid.major.y = element_blank()
) +
expand_limits(x = c(0,max(depts$count)*1.1))
```
### "Other" Departments
```{r}
other_depts <- results %>%
count(dept_other.pre, name = "count") %>%
drop_na() %>%
mutate(percent = (count / (n_total - n_post)) * 100,
text = sprintf("%.0f (%.0f%%)", count, percent))
ggplot(other_depts, aes(y=reorder(dept_other.pre, count), x=count)) +
geom_col() +
geom_label(aes(label = text, hjust = -0.1),
size = 3) +
labs(x = "# respondents", y = element_blank()) +
theme_minimal() +
theme(
panel.grid.minor = element_blank(),
panel.grid.major.y = element_blank()
) +
expand_limits(x = c(0,max(other_depts$count)*1.1))
```
## Current occupation / Career stage
```{r}
ocup <- results %>% select(occupation.pre) %>%
separate_rows(occupation.pre, sep=",") %>%
mutate(occupation.pre = str_trim(occupation.pre)) %>%
count(occupation.pre, name = "count") %>%
drop_na() %>%
mutate(percent = (count / (n_total - n_post)) * 100,
text = sprintf("%.0f (%.0f%%)", count, percent))
ggplot(ocup, aes(y=reorder(occupation.pre, count), x=count)) +
geom_col() +
geom_label(aes(label = text, hjust = -0.1),
size = 3) +
labs(x = "# respondents", y = element_blank()) +
theme_minimal() +
theme(
panel.grid.minor = element_blank(),
panel.grid.major.y = element_blank()
) +
expand_limits(x = c(0,max(ocup$count)*1.2))
```
## Motivation - Why are you participating in this workshop?
```{r}
motiv <- results %>% select(motivation_select.pre) %>%
separate_rows(motivation_select.pre, sep=",") %>%
mutate(motivation_select.pre = str_trim(motivation_select.pre)) %>%
count(motivation_select.pre, name = "count") %>%
drop_na() %>%
mutate(percent = (count / (n_total - n_post)) * 100,
text = sprintf("%.0f (%.0f%%)", count, percent))
ggplot(motiv, aes(y=reorder(motivation_select.pre, count), x=count)) +
geom_col() +
geom_label(aes(label = text, hjust = -0.1),
size = 3) +
labs(x = "# respondents", y = element_blank()) +
theme_minimal() +
theme(
panel.grid.minor = element_blank(),
panel.grid.major.y = element_blank()
) +
expand_limits(x = c(0,max(motiv$count)*1.2))
```
## How did you find out about this workshop?
```{r}
findw <- results %>% select(findout_select.pre) %>%
separate_rows(findout_select.pre, sep=",") %>%
mutate(findout_select.pre = str_trim(findout_select.pre)) %>%
count(findout_select.pre, name = "count") %>%
drop_na() %>%
mutate(percent = (count / (n_total - n_post)) * 100,
text = sprintf("%.0f (%.0f%%)", count, percent))
ggplot(findw, aes(y=reorder(findout_select.pre, count), x=count)) +
geom_col() +
geom_label(aes(label = text, hjust = -0.1),
size = 3) +
labs(x = "# respondents", y = element_blank()) +
theme_minimal() +
theme(
panel.grid.minor = element_blank(),
panel.grid.major.y = element_blank()
) +
expand_limits(x = c(0,max(findw$count)*1.2))
```
## What you most hope to learn?
```{r}
results %>% group_by(workshop) %>%
select(workshop, hopes.pre) %>%
drop_na()
```
## Learning environment in the workshop
```{r}
#| message: false
#| output: false
orderedq <- c("Strongly Disagree", "Somewhat Disagree", "Neither Agree or Disagree","Somewhat Agree", "Strongly Agree")
addNA(orderedq)
```
```{r}
agree_questions <- results %>%
select(join_key, agree_apply.post, agree_comfortable.post, agree_clearanswers.post,
agree_instr_enthusiasm.post, agree_instr_interaction.post, agree_instr_knowledge.post
) %>%
filter(!if_all(-join_key, is.na))
n_agree_questions <- nrow(agree_questions)
agree_questions <- agree_questions %>%
pivot_longer(cols = -join_key, names_to = "Question", values_to = "Response") %>%
mutate(Response = factor(Response, levels = orderedq),
Question = recode(Question,
"agree_apply.post" = "Can immediatly apply
what they learned",
"agree_comfortable.post" = "Comfortable learning in
the workshop environment",
"agree_clearanswers.post" = "Got clear answers
from instructors",
"agree_instr_enthusiasm.post" = "Instructors were enthusiastic",
"agree_instr_interaction.post" = "Comfortable interacting
with instructors",
"agree_instr_knowledge.post" = "Instructors were knowledgeable
about the material"
))
summary_data <- agree_questions %>%
count(Question, Response, name = "count") %>%
mutate(percent = (count / n_agree_questions) * 100,
text = sprintf("%.0f (%.0f%%)", count, percent))
ggplot(summary_data, aes(x = Question, y = count, fill = Response)) +
geom_col(position = "fill", color = "black", show.legend = TRUE) +
scale_y_continuous(labels = scales::percent_format()) +
scale_fill_manual(values = c("Strongly Disagree" = "#d01c8b",
"Somewhat Disagree" = "#f1b6da",
"Neither Agree or Disagree" = "#f7f7f7",
"Somewhat Agree" = "#b8e186",
"Strongly Agree" = "#4dac26"),
na.translate = TRUE, na.value = "#cccccc",
breaks = orderedq, drop = FALSE) +
geom_text(aes(label = text), size = 3,
position = position_fill(vjust = 0.5)) +
labs(y = "# respondents (Percentage)", x = element_blank(), fill = "Responses",
subtitle = paste0("Number of responses: ", n_agree_questions)) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
plot.subtitle = element_text(hjust = 0.5, size = 12))
```
## How an instructor or helper affected your learning experience
```{r}
#| message: false
results %>%
group_by(workshop) %>%
select(workshop, instructor_example.post) %>%
drop_na()
```
## Skills and perception comparison
```{r}
# Calculate mean scores and make graph for all respondents (only_matched=FALSE)
tryCatch(
{
mean_nresp <- get_mean_scores_nresp(results, only_matched=FALSE)
graph_pre_post(mean_nresp$mean_scores, mean_nresp$n_resp_pre, mean_nresp$n_resp_post, mean_nresp$n_resp_pre_post, only_matched=FALSE)
},
error = function(cond) {
message("Could not do the plots as there are no pre or post results to show")
}
)
```
```{r}
# Calculate mean scores and make graph for only matched respondents in pre and post (only_matched=TRUE)
tryCatch(
{
mean_nresp <- get_mean_scores_nresp(results, only_matched=TRUE)
graph_pre_post(mean_nresp$mean_scores, mean_nresp$n_resp_pre, mean_nresp$n_resp_post, mean_nresp$n_resp_pre_post, only_matched=TRUE)
},
error = function(cond) {
message("Could not do the plots as there are no pre or post results to show")
}
)
```
## Workshop Strengths
```{r}
results %>%
group_by(workshop) %>%
select(workshop, workshop_strengths.post) %>%
drop_na()
```
## Ways to improve the workshop
```{r}
results %>%
group_by(workshop) %>%
select(workshop, workshop_improved.post) %>%
drop_na()
```
## How likely are you to recommend this workshop? Scale 0 - 10
```{r}
orderedq <- c("Detractor", "Passive", "Promoter")
nps <- results %>%
count(recommend_group.post, recommende_score.post, name = "count") %>%
drop_na() %>%
mutate(recommend_group.post = factor(recommend_group.post, levels = orderedq),
percent = (count/sum(count)) * 100,
text = sprintf("%.0f (%.0f%%)", count, percent))
nps %>%
ggplot(aes(x=recommende_score.post, y=count, fill=recommend_group.post)) +
geom_col(color="black", show.legend = TRUE) +
scale_fill_manual(values = c("Detractor" = "#af8dc3", "Passive" = "#f7f7f7", "Promoter" = "#7fbf7b"), breaks = c("Detractor", "Passive", "Promoter"), drop = FALSE) +
geom_label(aes(label = text, vjust = -0.5), fill = "white", size= 3) +
scale_x_continuous(breaks = 1:10) +
labs(x = "NPS Score", y = "# respondents", subtitle = paste0("Number of responses: ", sum(nps$count), "
Mean score: ", format(weighted.mean(nps$recommende_score.post, nps$count), digits = 3))) +
theme_minimal() +
theme(
panel.grid.minor = element_blank(),
panel.grid.major.x = element_blank(),
plot.subtitle = element_text(hjust = 0.5, size = 12)
) +
expand_limits(x = c(1,10),
y = c(0, max(nps$count)*1.1))
```
## Topic Suggestions
```{r}
results %>%
group_by(workshop) %>%
select(workshop, suggest_topics.post) %>%
drop_na()
```