-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattendance.qmd
214 lines (163 loc) · 8.21 KB
/
attendance.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
# Attendance {#sec-attendance}
```{r setup, include=FALSE}
# FUNCTIONS AND LIBRARIES
# have to load all data over again each document https://forum.posit.co/t/quarto-cant-find-r-objects/156848
knitr::opts_chunk$set(echo = FALSE)
library(ggplot2) #for plots
library(partykit) # for decision tree statistical analysis
library(tidyverse) #for data munging including dates
library(viridis) #color scheme
attendance <- read.csv("raw_data/processed_attendance_named.csv")
# read.csv("raw_data/processed_last_two_years_attendance.csv")
# read.csv("raw_data/processed_joined_post.csv")
# read.csv("raw_data/processed_postworkshopsurveys_named.csv")
```
## Executive summary
**Counts of workshop attendance are only influenced by whether a workshop was presented as part of course instruction.** Format (virtual, in-person, hybrid) and marketing did not change attendance counts. Even topics (@sec-topics) didn't impact attendance counts.
\newpage
## Per-workshop attendance by format and request
### Statistical analysis
For scheduled workshops, format and year impact attendance numbers in a conditional inference tree analysis. Virtual and hybrid workshops get generally higher numbers. Within in-person workshops, the most recent two years (2023-2024) have lowest numbers attending per workshop.
- format (in person vs virtual vs hybrid)
- calendar year (starts in January)
- semester (spring, summer, or fall)
- workshop topic
- multi-day vs single day scheduling
```{r att_tree, echo=FALSE, message = FALSE, warning = FALSE, output = FALSE}
library(ggplot2) #for plots
library(partykit) #for ctree
this_year <- format(as.Date(Sys.Date(), format="%Y/%m/%d/"),"%Y")
last_two_years <- as.numeric(this_year)-2
att_tree <- ctree(Total.Attendees ~
as.factor(Format) +
as.factor(year)+
as.factor(WorkshopCode) +
as.factor(Is.this.visit.part.of.a.series.) +
as.factor(Semester),
# hour,
data = attendance [
attendance$Is.Course == "Not a course" &
attendance$Requested. == "No"&
attendance$year <= this_year &
attendance$year >= last_two_years,]
)
plot(att_tree)
#print(paste("Workshops from", last_two_years, "to", this_year, "(last two calendar years)"))
```
When we examine all workshops (included on-request visits to classes and on-request workshops), we add the following variables:
- workshop was in a course
- requested or not
Whether a workshop was in a course (where students are presumably required to attend) was the most dramatic factor in increased attendance numbers. For workshops not in a course, virtual and hybrid workshops have the highest attendance.
```{r att_tree2, echo=FALSE, message = FALSE, warning = FALSE}
att_tree2 <- ctree(Total.Attendees ~
as.factor(Format) +
as.factor(year)+
as.factor(WorkshopCode) +
as.factor(Is.this.visit.part.of.a.series.)+
as.factor(Semester) +
# hour +
as.factor(Is.Course) +
as.factor(Requested.)
,
data = attendance[
attendance$year <= this_year &
attendance$year >= last_two_years,]
)
plot(att_tree2)
```
### Format
Ignoring all other factors, the workshop format was not significantly different. You can also see this with a different visual analysis using notched box plots. The overlapping "notches" here show that there is no difference between median attendance for scheduled (not on request, not in a class) workshops by format.
```{r attendance_by_format_request, echo=FALSE, message = FALSE, warning = FALSE}
attendance[attendance$Is.Course == "Not a course" &
attendance$Requested. == "No",]%>%
ggplot(mapping = aes(x = Format,
y = Total.Attendees))+
geom_boxplot(notch = TRUE) +
labs(x = "Workshop format",
y = "Total attendees per workshop"
)
```
### Workshop attendance over time
The median number of people at each scheduled workshop has declined slightly per calendar year from 2021-2024. Workshop attendance at courses is higher, presumably because most classes have to reach a certain enrollment to "make".
```{r avg_attendance_over_time, echo=FALSE, message = FALSE, warning = FALSE}
plot_time <- attendance %>%
ggplot(mapping = aes(x = as.factor(year),
y = Total.Attendees,
fill = Is.Course)) +
geom_boxplot(notch = TRUE) +
labs (y = "Total attendees per workshop",
x = "Calendar year",
fill = "Workshop offered in course")
plot_time
```
## Total people reached
The total number of people reached has no strong trends since 2021.
```{r, total_reached_over_time, echo=FALSE, message = FALSE, warning = FALSE}
attendance %>%
group_by(year, Is.Course) %>%
summarize(total_reached = sum(Total.Attendees, na.rm = TRUE)) %>%
bind_rows(summarise(.,
across(where(is.numeric), sum),
across(where(is.character), ~"Total")))%>% # https://stackoverflow.com/a/50322272
pivot_wider(names_from = year,
values_from = total_reached)
```
The proportion of total people reached each calendar year in courses peaked in 2020, declined, and then has increased each calendar year since 2021.
```{r, prop_attendance_over_time, echo=FALSE, message = FALSE, warning = FALSE}
# https://r-graphics.org/recipe-bar-graph-proportional-stacked-bar
attendance %>%
group_by(year,
Is.Course) %>%
summarize(count_per_each = n()) %>%
ggplot(
aes(x = year,
y = count_per_each,
fill = Is.Course)) +
geom_col(position = "fill")+
scale_fill_viridis_d (aesthetics = "fill")+
labs(y = "Proportion of people reached",
x = "Calendar year",
fill = "Workshop offered in course")
```
\newpage
::: content-hidden
## Workshop length vs attendance
### length of session
- Low priority: session length vs attendance
### Single day over multiple sessions vs two-day workshops
```{r carpentries_attendance, echo=FALSE, message = FALSE, warning = FALSE}
# #Last one! Plotting attendance for carpentries by multi-day VS single-topic
#
# carpentries <- workshop %>% filter(grepl('Standalone Bash|Standalone Carpentries R|Standalone Git|
# Standalone Openrefine|Standalone Python|Standalone SQL|Two-day Carpentries with R|Two-day Carpentries with Python', Topic))
#
# carpentries %>%
# ggplot (aes(x=Topic, y=Total.Attendees, fill=Topic)) +
# geom_boxplot(outlier.shape = NA) +
# scale_fill_viridis(discrete = TRUE) +
# theme(panel.background = element_rect(fill = "lightgray",
# color = "white",
# size = 0.5, linetype = "solid"),
# panel.grid.major = element_line(size = 0.5, linetype = "solid",
# color = "darkgray"),
# panel.grid.minor = element_line(size = 0.25, linetype = "solid",
# color = "darkgray"),
# plot.title = element_text(size = 20, hjust = 0.5),
# axis.title = element_text(size = 14),
# axis.text = element_text(size = 12, angle = 90, hjust = 0.95, vjust = 0.2)
# )+
# geom_jitter(alpha = 0.55, size = 4, position = position_jitter (width = .08, height = .04), show.legend = FALSE) +
# ggtitle('Multi-Day VS Single Day Workshops')
```
## Workshop helper load for on-request workshops over time
DSI request 2023/07: - TODO: Libraries personnel to attendance ratios for On Request workshops. which high-helper topics requested more over time and do we have enough data yet, are those increasing.
```{r attendance_over_time, echo=FALSE, message = FALSE, warning = FALSE}
# plot_helpers <- attendance[attendance$Requested.=="Y",] %>%
# ggplot(mapping = aes(x = as.factor(Calendar.Year),
# y = helpers/Total.Attendees,
# fill = Topic)) +
# geom_boxplot(notch = TRUE)
# plot_helpers
```
\newpage
:::