While teaching at UBC is challenging and demanding, teaching in the Master of Data Science (MDS) program is even tougher as this is an accelerated program. Needless to say, the MDS teaching team is under a lot of stress when it comes to managing students’ grade and adjusting the difficulties of the program.

As a result, our team has come up with a good solution for instructors to reduce their workload on handling the grades. With our handy package, instructors can:

  • Register MDS courses
  • Record weekly grades
  • Calculate course statistics such as mean, median, 1st or 3rd quantile
  • Rank courses
  • Rank students
  • Calculate final grades for each course
  • Adjust the students’ grades

Register courses

It is the beginning of a new school year, and our beloved instructors need to register new courses in the system.

course_details %>%
  head(3)
#> # A tibble: 3 x 3
#>   course_id assessment_id weight
#>       <dbl> <chr>          <dbl>
#> 1       511 lab1            0.15
#> 2       511 lab2            0.15
#> 3       511 lab3            0.15

They can simply call the register_courses function in order to transform the data into a tidy data frame. In addition, it will also perform additional checks to make sure the course_id and assessment_id are in a list of predefined values, and the latter will be between 0 and 1 with all components for a course add up to 1.

courses <- register_courses(course_details)
  
courses
#>   course_id lab1 lab2 lab3 lab4 quiz1 quiz2 milestone1 milestone2 milestone3
#> 1       511 0.15 0.15 0.15 0.15   0.2   0.2        0.0        0.0        0.0
#> 2       522 0.00 0.00 0.00 0.00   0.0   0.0        0.1        0.2        0.2
#>   milestone4 feedback
#> 1        0.0      0.0
#> 2        0.3      0.2

Record grades

Continuous assessment is an effective way to assess how well the students understand the materials. For the majority of classes, these components consist of weekly labs and fortnightly quizzes. However, for some particular courses, there are unique components such as “Peer Review”, “Milestone”… Instructors can effortlessly record these grades by calling the record_grades function. In addition, additional data sanity checks are also conducted to make sure the course_id and assessment_id are in a list of predefined values, and the grades must be between 0 and 100.

grade_details %>%
  head(3)
#> # A tibble: 3 x 4
#>   course_id student_id assessment_id grade
#>       <dbl> <chr>      <chr>         <dbl>
#> 1       511 tom        lab1          100  
#> 2       511 tom        lab2          100  
#> 3       511 tom        lab3           79.2
grades <- record_grades(grade_details)
  
grades
#>   course_id student_id  lab1  lab2 lab3 lab4 quiz1 quiz2 milestone1 milestone2
#> 1       511        tom 100.0 100.0 79.2 83.6  75.6  75.6        0.0        0.0
#> 2       511       tiff  87.6 100.0 81.2 89.2 100.0  73.2        0.0        0.0
#> 3       511       mike  84.4  79.6 75.2 98.8  84.8 100.0        0.0        0.0
#> 4       511       joel 100.0 100.0 99.6 71.2  96.8  79.2        0.0        0.0
#> 5       522        tom   0.0   0.0  0.0  0.0   0.0   0.0      100.0       97.6
#> 6       522       tiff   0.0   0.0  0.0  0.0   0.0   0.0      100.0       77.2
#> 7       522       mike   0.0   0.0  0.0  0.0   0.0   0.0       92.0       75.6
#> 8       522       joel   0.0   0.0  0.0  0.0   0.0   0.0       98.4       85.6
#>   milestone3 milestone4 feedback
#> 1        0.0        0.0      0.0
#> 2        0.0        0.0      0.0
#> 3        0.0        0.0      0.0
#> 4        0.0        0.0      0.0
#> 5       80.0      100.0    100.0
#> 6       76.8      100.0     85.6
#> 7       97.6       84.4     98.8
#> 8       96.8      100.0     82.4

Generate course statistics

There are times instructors may want to see how well students perform for each course. Typically, metrics such as mean, median, 1st and 3rd quantile can be utilized to demonstrate how the grades in a class distributed. Understanding this need, we have implemented the generate_course_statistics function to assist them.

generate_course_statistics(courses, grades, course_ids = c("511", "522"))
#>   course_id  mean 1st-quantile median 3rd-quantile
#> 1       511 87.87        86.91     88        88.96
#> 2       522 91.29        88.67  90.86        93.48

We can clearly see that students in the 522 class are doing better than in the 511 class.

Rank courses

Making the difficulty level consistent among courses is one of the top priorities that lecturers want to achieve. On the one hand, an easy class may make students feel bored as the content is not that challenging. On the other hand, making a course incredibly hard may be ineffective as students may give up after having struggled with the materials. As a result, it is beneficial to the teaching team if they can compare courses against each other to see if any of them is too hard or too easy. Fortunately, rank_courses function can yield the expected result.

rank_courses(courses, grades, "median", descending=FALSE)
#>   course_id grade
#> 1       511    88
#> 2       522 90.86

Rank students

Sometimes, instructors may want to know which students are the best performers in the class in order to give them an award or ask them to share their learning tips with classmates. However, there are cases where they want to identify students who fall behind their peer so that they can approach and give these students appropriate support. As a result, lecturers can make use of the rank_students function.

rank_students(final_grade, courseid = "511", n = 4, ascending = TRUE)
#>   student_id grade rank
#> 1       joel    67    4
#> 2       mike    70    3
#> 3       tiff    80    2
#> 4        tom    90    1

It seems Joel needs some extra help in the 511 class!

Calculate final grades

It is time to submit the final grades to Canvas! Fortunately, lecturers can do that by calling one simple function, which is calculate_final_grade

calculate_final_grade(courses, grades, course_ids = c("522"))
#>   course_id student_id grade
#> 1       522        tom 95.52
#> 2       522       tiff 87.92
#> 3       522       mike 88.92
#> 4       522       joel 92.80

It looks like all students in 522 class are doing well!

Suggest grade adjustment

Our MDS teaching team aims to maintain an 85% average grade for each course. It is a real hassle to try adjusting the grades for quizzes or labs manually. Thanks to suggest_grade_adjustment, it is simple for lecturers to simulate the final grades that need to be adjusted to meet their benchmarks for quizzes, labs or even the overall course.

# Before adjustment
grades %>%
  dplyr::filter(course_id == "511") %>%
  dplyr::select(course_id, student_id, lab1, lab2, lab3, lab4, quiz1, quiz2)
#>   course_id student_id  lab1  lab2 lab3 lab4 quiz1 quiz2
#> 1       511        tom 100.0 100.0 79.2 83.6  75.6  75.6
#> 2       511       tiff  87.6 100.0 81.2 89.2 100.0  73.2
#> 3       511       mike  84.4  79.6 75.2 98.8  84.8 100.0
#> 4       511       joel 100.0 100.0 99.6 71.2  96.8  79.2

# After adjustment
suggest_grade_adjustment(courses, grades, id = "511", benchmark_course = 90,
                         benchmark_lab = 85, benchmark_quiz = 85) %>%
  dplyr::select(course_id, student_id, lab1, lab2, lab3, lab4, quiz1, quiz2)
#>   course_id student_id lab1  lab2  lab3 lab4 quiz1 quiz2
#> 1       511        tom  100 100.0  81.2 83.6  75.6  79.6
#> 2       511       tiff  100 100.0  83.2 89.2 100.0  77.2
#> 3       511       mike  100  86.6  77.2 98.8  84.8 100.0
#> 4       511       joel  100 100.0 100.0 71.2  96.8  83.2