Processing Scripts

This is a comprehensive resource page that hosts a vast array of processing scripts that will serve as your go-to reference whenever you encounter a question or require specific tools. Specifically, we have compiled some example scripts that can assist you in processing raw data in R. It’s important to note that they may not be compatible with the latest versions and you may have to update some code. However, the codes and scripts can still provide valuable insights and serve as a foundation for your data processing tasks. Make sure to adapt the code to the latest versions of the tools or libraries you are using.

Resources for Processing Psychological Constructs and Student Background

create-data-survey-all.Rmd (Rmd, 3KB) is a processing script to extract and clean the survey responses from any of the following release versions:

  • v5.5.1
  • v5.5
  • v5.4
  • v5.3
  • v5.2
  • v5.1.1
  • v5.1
  • v5.0

You’ll also need the correspondingcodebook_all_surveys.csv.

Resources for Processing Engagement Data

The scripts below will help process engagement data. For example, calculate the number of minutes students spend per page or chapter or explore how often students visit content. These engagement data are stored in three separate files: page views, responses, and media views. Find a description of the engagement data files here.

Scripts for processing engagement data, 5.0(Rmd, 16KB).

Resources for Processing Response Data

Below, you’ll find scripts to process the response data, which includes responses to the formative assessments embedded in the textbook. These questions, broadly, take two forms: coding and non-coding questions. To process this type of data, you’ll use the responses.csv file - you can find a description of each variable in the responses.csv file here.

Coding questions

Our data include each time students submit a coding response (i.e., any time students hit the submit button). For any given coding question, you can find its name in the bottom left corner of a coding exercise (e.g., the one shown below is called ch1-6). Students may have multiple responses for each coding question because they may submit multiple times.

Scripts for processing coding questions, 5.0(Rmd, 16KB).

Non-coding questions

Non-coding questions in the interactive textbook are delivered through a technology called Learnosity which only allows one response per submit. These questions are a mix of multiple-choice, check all that apply, matching, and written response. Survey questions are also delivered as Learnosity questions.

Scripts for processing non-coding questions, 5.0(Rmd, 13KB).

End of chapter review questions

Are you interested in students’ performance in the form of formal assessments during the course? If you are, you can download this script for processing end of chapter review questions version 5.0(R, 3KB). This script will help you process the end of chapter review questions for version 5, creating a chapter-level average score per student.