9,786
Views
22
CrossRef citations to date
0
Altmetric
Data Science

Using GitHub Classroom To Teach Statistics

, , &

Figures & data

Table 1 Definitions of terms associated with Git and GitHub. Many definitions are modified from Bryan (Citation2018) and GitHub Help (n.d.)

Fig. 1 Creation and distribution of assignments with GitHub Classroom versus a University CMS. In both settings, the instructor begins with the homework assignment, which contains (starter) code, data, and instructions, on their local computer. With GitHub Classroom, the instructor pushes all parts of the assignment to the GitHub master organization. Using the GitHub Classroom interface, the instructor can create a homework repository for each student with a click of a button. Students then use git clone to download the homework assignment onto their local computers, maintaining the same directory structure and file names. Instructors using a CMS would have to upload each piece of the assignment individually. Each piece of the assignment is then downloaded individually by students. Because the students do not clone the whole assignment directory into their local computers, students can end up with different directory structures and/or different file names, which can result in difficulty running starter code and producing reproducible analyses.

Fig. 1 Creation and distribution of assignments with GitHub Classroom versus a University CMS. In both settings, the instructor begins with the homework assignment, which contains (starter) code, data, and instructions, on their local computer. With GitHub Classroom, the instructor pushes all parts of the assignment to the GitHub master organization. Using the GitHub Classroom interface, the instructor can create a homework repository for each student with a click of a button. Students then use git clone to download the homework assignment onto their local computers, maintaining the same directory structure and file names. Instructors using a CMS would have to upload each piece of the assignment individually. Each piece of the assignment is then downloaded individually by students. Because the students do not clone the whole assignment directory into their local computers, students can end up with different directory structures and/or different file names, which can result in difficulty running starter code and producing reproducible analyses.

Fig. 2 Grading assignments with GitHub Classroom vs. a University CMS. With GitHub Classroom (left side), students all finish the assignment with the same directory structure (bottom left). Students use the git push command to upload each piece of their assignment to the GitHub Classroom organization. The instructor then uses our shell script to download all assignments to their local computer, with one command. Because each assignment retains the same directory structure, the instructor can run student code which relies on reading in pieces of data. The instructor then pushes graded assignments with one command back to the GitHub Classroom organization. Using a university CMS, students first have to individually upload each part of the assignment that will be used for grading. Instructors then download each of the uploaded files, and lose all directory structures from students’ assignments. After (potentially) running student code and grading, instructors then have to individually upload each graded file back to the CMS.

Fig. 2 Grading assignments with GitHub Classroom vs. a University CMS. With GitHub Classroom (left side), students all finish the assignment with the same directory structure (bottom left). Students use the git push command to upload each piece of their assignment to the GitHub Classroom organization. The instructor then uses our shell script to download all assignments to their local computer, with one command. Because each assignment retains the same directory structure, the instructor can run student code which relies on reading in pieces of data. The instructor then pushes graded assignments with one command back to the GitHub Classroom organization. Using a university CMS, students first have to individually upload each part of the assignment that will be used for grading. Instructors then download each of the uploaded files, and lose all directory structures from students’ assignments. After (potentially) running student code and grading, instructors then have to individually upload each graded file back to the CMS.

Fig. 3 Using a master GitHub Classroom organization improves management of course material. An instructor who wishes to make a change to an assignment would make a change to the assignment in the master organization (red, bold, and italicized font denotes a changed file), which will then be present when creating new assignments. In this example, the instructor changed the dataset for the 2020 course iteration. In 2021, the new instructor added an additional analysis, which resulted in changing the assignment instructions and starter code.

Fig. 3 Using a master GitHub Classroom organization improves management of course material. An instructor who wishes to make a change to an assignment would make a change to the assignment in the master organization (red, bold, and italicized font denotes a changed file), which will then be present when creating new assignments. In this example, the instructor changed the dataset for the 2020 course iteration. In 2021, the new instructor added an additional analysis, which resulted in changing the assignment instructions and starter code.

Fig. 4 The number of repositories in the classroom organization becomes overwhelming. By the end of the semester, we had 256 repositories in the ICS course. This figure shows an example of what the organization page looks like at the end of the semester, when visited on GitHub. Student usernames are redacted for privacy.

Fig. 4 The number of repositories in the classroom organization becomes overwhelming. By the end of the semester, we had 256 repositories in the ICS course. This figure shows an example of what the organization page looks like at the end of the semester, when visited on GitHub. Student usernames are redacted for privacy.

Fig. 5 Students see instructor feedback in GitHub. After an instructor has provided feedback in a student’s assignment, the instructor then commits the feedback and pushes the updated file to the student’s assignment repository. By clicking on the commit message, the student then sees the feedback given by instructors, which is highlighted in green.

Fig. 5 Students see instructor feedback in GitHub. After an instructor has provided feedback in a student’s assignment, the instructor then commits the feedback and pushes the updated file to the student’s assignment repository. By clicking on the commit message, the student then sees the feedback given by instructors, which is highlighted in green.
Supplemental material

Supplemental Material

Download Zip (63.7 KB)