A simple timer for the 6.1 overview notebook
These stopwatches were developed specifically for the Chapter 6.1-6.3 Overview Notebook. However, they can be used wherever we want students to use a stopwatch for collecting data. Unless specified as otherwise, these stopwatches will record their data in a centralized Google sheet. The data can be easily downloaded into R for a specific class or user.
The following parameters, which can be included in the url that configures the stopwatch, determine the behavior of the stopwatch. (We will show examples of urls below.)
| Parameter | Description | Default | Options |
|---|---|---|---|
| trials | Maximum number of trials before the button is disabled. If omitted, no limit is enforced. | (none) | Any positive integer |
| progress | Controls whether the live timer is shown or hidden during the trial. | show | show, hide |
| result | Controls whether the elapsed time is shown at the end of each trial. | show | show, hide |
| save_data | If set to false, trial data will not be saved to the Google Sheet. | true | true, false |
The following additional parameters can be set and passed on with the data for each trial.
| Parameter | Description | Default | Options |
|---|---|---|---|
| class_id | Identifies the class for grouping or filtering data. Set by the teacher in the notebook and can be any unique ID (e.g., the teacher's email address) | anonymous | Any string |
| user_id | Identifies the user. Typically set in the notebook to the be user's Jupyter ID. | anonymous | Any string |
| session_id | Unique identifier for each session. New sessions start on browser refresh or cell being re-run. | (generated) | 5-character alphanumeric string |
| date | Timestamp for each trial, recorded in UTC. Useful for sorting, filtering, or session tracking. | (generated) | ISO 8601 UTC timestamp |
| condition | Used to label experimental or instructional groups. Saved in the dataset for analysis. | none | Any string |
Data from the stopwatch are save in a centralized Google sheet that holds data for many classes. Example code for importing data from the spreadsheet into R is shown in section 3, below. By filtering data, you can look at only data for your class, for yourself (i.e., a single user), or for everyone. 6 variables are posted to the Google sheet, for each trial, in this order:
- class_id - a unique ID supplied by the teacher)
- user_id - typically the Jupyter ID generated in the notebook)
- session_id - a unique ID that is generated each time the code is run)
- date
- condition - can be any text string)
- trial - the attempt number for a session)
- time_sec
The values of class_id, condition, and user_id are generally set somewhere in the student-facing notebook before the cell in which the stopwatch appears. They could be set at the top of the notebook (in the setup cell), or revised later in the notebook (e.g., if the teacher wants to include both conditions in a notebook). The other variables are set automatically by the app.