Code
library(tidyverse)
library(janitor)
library(corrr)Discussion Participation and Student Engagement in Canvas Network Open Courses
Online discussion boards are a common component of online courses, but participation is often evaluated through post counts. My research interests include social discussion platforms such as Yellowdig and how discussion design supports engagement. This project examines whether discussion participation is associated with how frequently learners are active in online courses.
Main research question: What is the relationship between the number of discussion forum posts and the number of days learners are active in Canvas Network open courses?
Target audience: Online instructors and instructional designers who want to consider multiple measures of student engagement when reviewing course design.
The Canvas Network Person-Course De-Identified Open Dataset includes records from open online courses offered from January 2014 through September 2015. There are 325,199 learner-course records and 238 distinct courses in the downloaded CSV. Each record represents one user’s activity in one course; a user may have records for multiple courses.
According to the official data dictionary, nforum_posts is the total number of posts made in course discussion forums, and ndays_act is the number of distinct days with at least one recorded course event. These two variables provide measures of discussion participation and frequency of recorded activity.
I originally wanted to include ncontent as a third measure of engagement with course materials. However, the CSV includes a column named ncontent, while the official codebook describes a variable named nchapters and does not define ncontent. Because I could not verify that the two measures are equivalent or confidently interpret ncontent, I excluded both from the analysis and focused on discussion posts and active days.
The documentation states that blanks are null, not necessarily zero: a learner might not have produced an event, or a course might not have been designed to produce the measure. I therefore preserve missing values and report the number excluded from each analysis.
Data documentation: Canvas Network Person-Course Documentation, pp. 2–4.
The following libraries are utilized for analysis and visualization.
library(tidyverse)
library(janitor)
library(corrr)Place CNPC_1401-1509_DI_v1_1_2016-03-01.csv in a folder named data inside your RStudio project.
canvas <- read_csv("data/CNPC_1401-1509_DI_v1_1_2016-03-01.csv")
canvas <- clean_names(canvas)
names(canvas) [1] "course_id_di" "discipline" "userid_di"
[4] "registered" "viewed" "explored"
[7] "grade" "grade_reqs" "completed_percent"
[10] "course_reqs" "final_cc_cname_di" "primary_reason"
[13] "learner_type" "expected_hours_week" "lo_e_di"
[16] "age_di" "gender" "start_time_di"
[19] "course_start" "course_end" "last_event_di"
[22] "nevents" "ndays_act" "ncontent"
[25] "nforum_posts" "course_length"
glimpse(canvas)Rows: 325,199
Columns: 26
$ course_id_di <dbl> 832945142, 832960754, 832945598, 832945596, 832945…
$ discipline <chr> "Mathematics & Statistics", "Education", "Professi…
$ userid_di <dbl> 832433672, 832367550, 832626198, 832633777, 832676…
$ registered <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
$ viewed <dbl> 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
$ explored <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
$ grade <dbl> 0.000, 0.358, 0.000, 0.000, NA, NA, 0.000, 0.000, …
$ grade_reqs <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
$ completed_percent <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ course_reqs <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
$ final_cc_cname_di <chr> "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", …
$ primary_reason <chr> "Missing", "I hope to gain skills for a new career…
$ learner_type <chr> "Missing", "Passive participant", "Passive partici…
$ expected_hours_week <chr> "Between 4 and 6 hours", "Between 1 and 2 hours", …
$ lo_e_di <chr> "Completed 2-year college degree", "Completed 2-ye…
$ age_di <chr> "{19-34}", "{19-34}", "{19-34}", "{19-34}", "{19-3…
$ gender <chr> "{}", "{}", "{}", "{}", "{}", "{}", "{}", "{}", "{…
$ start_time_di <chr> NA, "2015 Q2", "2015 Q1", NA, NA, NA, NA, "2015 Q1…
$ course_start <chr> "2014 Q1", "2015 Q2", "2014 Q4", "2014 Q4", "2014 …
$ course_end <chr> "2014 Q2", "2015 Q2", "2015 Q2", "2015 Q2", "2014 …
$ last_event_di <chr> NA, "2015 Q2", "2015 Q1", NA, NA, NA, NA, "2015 Q1…
$ nevents <dbl> NA, 45, 35, NA, NA, NA, NA, 67, NA, NA, NA, NA, NA…
$ ndays_act <dbl> NA, 3, 1, NA, NA, NA, NA, 5, NA, NA, NA, 1, NA, NA…
$ ncontent <dbl> NA, 100, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
$ nforum_posts <dbl> NA, 7, NA, NA, 3, NA, 1, NA, NA, NA, NA, NA, 6, 3,…
$ course_length <dbl> 48, 42, 123, 123, 53, 101, 21, 53, 62, 39, 69, 196…
head(canvas)# A tibble: 6 × 26
course_id_di discipline userid_di registered viewed explored grade grade_reqs
<dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 832945142 Mathemati… 832433672 1 0 0 0 0
2 832960754 Education 832367550 1 1 0 0.358 1
3 832945598 Professio… 832626198 1 1 0 0 0
4 832945596 Professio… 832633777 1 0 0 0 0
5 832945508 Humanities 832676450 1 0 0 NA 0
6 832945284 Computer … 832649000 1 0 0 NA 0
# ℹ 18 more variables: completed_percent <dbl>, course_reqs <dbl>,
# final_cc_cname_di <chr>, primary_reason <chr>, learner_type <chr>,
# expected_hours_week <chr>, lo_e_di <chr>, age_di <chr>, gender <chr>,
# start_time_di <chr>, course_start <chr>, course_end <chr>,
# last_event_di <chr>, nevents <dbl>, ndays_act <dbl>, ncontent <dbl>,
# nforum_posts <dbl>, course_length <dbl>
canvas |>
summarize(
total_records = n(),
missing_posts = sum(is.na(nforum_posts)),
missing_days = sum(is.na(ndays_act))
)# A tibble: 1 × 3
total_records missing_posts missing_days
<int> <int> <int>
1 325199 288108 223965
I excluded course registrants without at least one recorded active day. This focuses the analysis on learners with observable LMS activity, rather than everyone who registered. Learners with missing ndays_act are excluded at this stage because their activity level cannot be established from this field.
canvas_active <- canvas |>
filter(ndays_act >= 1)
canvas_active |>
summarize(
active_records = n(),
missing_posts = sum(is.na(nforum_posts))
)# A tibble: 1 × 2
active_records missing_posts
<int> <int>
1 101234 82310
For the analysis of forum posts and active days, I retain active learners with recorded forum-post counts. This is a subset of learners with observable posting activity, not everyone who was active. I keep missing counts as missing rather than assuming they represent zero posts.
engagement <- canvas_active |>
select(course_id_di, userid_di, nforum_posts, ndays_act) |>
filter(!is.na(nforum_posts), nforum_posts >= 0)
engagement |>
summarize(analysis_records = n())# A tibble: 1 × 1
analysis_records
<int>
1 18924
head(engagement)# A tibble: 6 × 4
course_id_di userid_di nforum_posts ndays_act
<dbl> <dbl> <dbl> <dbl>
1 832960754 832367550 7 3
2 832960781 832391307 2 14
3 832960046 832344282 2 5
4 832960027 832349611 1 14
5 832960781 832371449 3 4
6 832960781 832349297 1 2
These are descriptive statistics for learners with at least one active day and a recorded number of forum posts, not for every learner who registered or was active.
engagement |>
summarize(
mean_posts = mean(nforum_posts),
median_posts = median(nforum_posts),
mean_days = mean(ndays_act),
median_days = median(ndays_act)
)# A tibble: 1 × 4
mean_posts median_posts mean_days median_days
<dbl> <dbl> <dbl> <dbl>
1 4.99 2 7.72 5
engagement |>
ggplot(aes(x = nforum_posts)) +
geom_histogram(bins = 30) +
labs(title = "Distribution of discussion posts among learners with recorded activity",
x = "Number of forum posts", y = "Learner-course records") +
theme_minimal()The distribution of discussion participation was heavily right-skewed, with most learners contributing relatively few posts. To make the differences easier to visualize, I grouped posting activity into five categories: 1, 2, 3–5, 6–10, and 11 or more posts.
engagement_groups <- engagement |>
mutate(
post_group = if_else(nforum_posts == 1, "1 post",
if_else(nforum_posts == 2, "2 posts",
if_else(nforum_posts <= 5, "3-5 posts",
if_else(nforum_posts <= 10, "6-10 posts",
"11+ posts"))))
)Then I recreated my Figure 1
engagement_groups |>
count(post_group) |>
ggplot(aes(x = post_group, y = n)) +
geom_col() +
labs(
title = "Distribution of Discussion Forum Participation",
x = "Number of Discussion Posts",
y = "Number of Learner-Course Records"
) +
theme_minimal()These findings highlight considerable variation in discussion participation among learners with recorded forum activity.
engagement |>
ggplot(aes(x = nforum_posts, y = ndays_act)) +
geom_point(alpha = 0.2) +
labs(title = "Discussion posts and days active",
x = "Number of forum posts", y = "Number of active days") +
theme_minimal()Because most learners contributed relatively few discussion posts and were active on relatively few days, the original scatterplot had a large concentration of overlapping points. I adjusted the visualization to focus on the most common participation levels and used transparency to make overlapping observations easier to identify. I also added a linear trend line to illustrate the overall relationship.
engagement |>
ggplot(aes(x = nforum_posts, y = ndays_act)) +
geom_point(alpha = 0.2) +
geom_smooth(method = "lm", se = FALSE) +
coord_cartesian(
xlim = c(0, 20),
ylim = c(0, 30)
) +
labs(
title = "Relationship Between Discussion Posts and Active Days",
subtitle = "Zoomed view of common participation levels",
x = "Number of Discussion Forum Posts",
y = "Number of Active Days",
caption = "Trend line fitted to the full analysis dataset"
) +
theme_minimal()The trend line shows a positive relationship between discussion posts and active days. However, the points remain widely dispersed, suggesting that discussion participation explains only a limited amount of the variation in active days. Students who post more frequently generally tend to be active on more days, but this pattern is not consistent across all learners.
I used a Pearson correlation to examine the relationship between discussion forum participation (nforum_posts) and the number of days learners were active in their courses (ndays_act). Because both variables are numerical, correlation allows me to measure the direction and strength of their relationship. This analysis helps answer my research question by determining whether learners who contribute more discussion posts also tend to be active on more days.
engagement |>
select(nforum_posts, ndays_act) |>
correlate()# A tibble: 2 × 3
term nforum_posts ndays_act
<chr> <dbl> <dbl>
1 nforum_posts NA 0.257
2 ndays_act 0.257 NA
The correlation analysis found a positive but relatively weak relationship between the number of discussion posts and the number of days learners were active in their courses (r = 0.257). This suggests that learners who contributed more discussion posts tended to be active on more days, although the relationship was not particularly strong.
Most learners contribute relatively few discussion posts. Discussion participation was heavily right-skewed. The median number of posts was 2, while the mean was approximately 5. Nearly 40% of the learner-course records included only one discussion post, and approximately 55% included just one or two posts. This suggests that participation was concentrated at relatively low levels, with a smaller group of learners contributing substantially more posts.
Learners varied considerably in how frequently they accessed their courses. The median number of active days was 5, compared with a mean of approximately 8. Some learners were active for only one day, while others were active for substantially longer periods. This variation suggests that even among learners who contributed to discussions, the frequency of course activity differed considerably.
Discussion participation and active days had a weak positive relationship. The Pearson correlation between discussion posts and active days was r = 0.257. Learners who contributed more discussion posts tended to be active on more days, but the relationship was relatively weak. The scatterplot and trend line supported this finding, although learners with similar numbers of posts showed considerable variation.
Discussion post counts alone provide a limited picture of student engagement. Although discussion participation was positively associated with active days, the weak correlation suggests that posting frequency alone does not fully describe how learners engage with their courses. However, both measures reflect observable LMS activity rather than the quality of student engagement or learning.
Additionally, because contributing a discussion post generates course activity, the relationship between these measures may partly reflect how Canvas records participation.
This analysis may help online instructors and instructional designers recognize that forum-post counts capture only one dimension of recorded course activity. Reviewing active days alongside post counts can provide a broader picture of recorded participation. However, quantitative activity metrics alone do not capture the quality of discussion or student learning. Instructors should consider whether discussion activities encourage meaningful interaction rather than simply increasing the number of required posts. In future research, I intend to include metrics like these in a mixed-methods, possibly case-study approach that examines different discussion forum approaches, including comparisons with alternative online discussion tools such as Yellowdig.
There are several limitations to consider when interpreting the findings of this analysis.
First, the Canvas Network dataset contains de-identified learner information. Although names and other identifying information have been removed, it is still important to protect student privacy and report findings in aggregate rather than focusing on individual learners.
Another limitation is how missing data were handled. The analysis included learners who were active for at least one day and had a recorded number of discussion posts. The codebook indicates that missing values may reflect either a lack of activity or differences in how courses were designed. Because I could not confidently interpret missing discussion counts as zero, I excluded those records. As a result, the findings do not represent all registered learners or students who did not participate in discussions.
I also originally intended to examine engagement with course content using the ncontent variable. However, the dataset included this variable while the official codebook documented a different variable, nchapters. Because I could not verify what ncontent measured, I removed it from the analysis.
There are also limitations in how engagement is measured. The number of discussion posts tells us how often learners contributed but does not capture the quality or meaningfulness of those interactions. Similarly, active days indicate how frequently learners accessed their courses but do not tell us how much time they spent learning or what they accomplished. In addition, discussion posting itself contributes to LMS activity, so the two measures are not entirely independent.
Because this analysis examines correlation, I cannot conclude that contributing more discussion posts causes learners to be active on more days. Other factors, such as course design, duration, and participation requirements, may influence both measures.
Finally, the dataset comes from open online courses offered between 2014 and 2015. Online learning tools and instructional practices have changed considerably since then, and participation in open courses may differ from participation in traditional university courses. Therefore, the findings may not generalize to today’s online learning environments.
Despite these limitations, the analysis provides a useful starting point for understanding patterns of online participation and reinforces the importance of looking beyond discussion post counts when evaluating student engagement.
Canvas Network. (2016). Canvas Network Person-Course (1/2014–9/2015): De-identified dataset documentation. Harvard Dataverse. https://doi.org/10.7910/DVN/1XORAL/RLHZYZ
Canvas Network. (2016). Canvas Network Person-Course (1/2014–9/2015) de-identified open dataset. Harvard Dataverse. https://doi.org/10.7910/DVN/1XORAL