One dataset for the whole course
The Student Life Survey
300 made-up university students, followed over one semester. Every lesson and exercise uses it. No real people are involved, so practise freely.
Download students.csv and save it in your project's data folder. Lesson 4 also uses the same data as an Excel file and an SPSS file.
The columns
| Column | What it is | Values |
|---|---|---|
ID |
Student ID | S001 to S300 |
Gender |
Gender | Female, Male |
Age |
Age in years | 18 to 29 |
Living |
Where they live | Hall (student hall), Home |
StudyHours |
Hours of study per week | 0 to 31 · 6 missing |
Attendance |
% of classes attended | 56 to 100 |
Motivation |
Self-rated motivation | Low, Medium, High |
LearningStyle |
Preferred learning style, as a code | 0 Visual, 1 Kinaesthetic, 2 Auditory, 3 Reading/Writing |
Sleep |
Hours of sleep per night | 4 to 9 · 10 missing |
Stress |
Self-rated stress | 1 (very low) to 10 (very high) |
ExamScore |
Final exam score | 0 to 100 |
Grade |
Grade from the exam score | A (80+), B (65 to 79), C (50 to 64), D (below 50) |
Workshop |
Took a wellbeing workshop during the semester | Yes, No |
Wellbeing_T1 |
Wellbeing at the start of semester | 1 (very low) to 7 (very high) |
Wellbeing_T2 |
Wellbeing at the end of semester | 1 to 7 |
Used_Support |
Used the university's wellbeing support | Yes, No |
A first look
library(tidyverse)
students <- read_csv("data/students.csv", show_col_types = FALSE)
glimpse(students)Output
Rows: 300
Columns: 16
$ ID <chr> "S001", "S002", "S003", "S004", "S005", "S006"…
$ Gender <chr> "Male", "Male", "Female", "Male", "Female", "M…
$ Age <dbl> 20, 21, 19, 19, 21, 22, 21, 20, 19, 21, 23, 21…
$ Living <chr> "Hall", "Hall", "Hall", "Home", "Hall", "Home"…
$ StudyHours <dbl> 16, NA, 0, 3, 27, 19, 20, 4, 16, 17, 21, 22, 1…
$ Attendance <dbl> 92, 88, 86, 89, 92, 56, 92, 61, 82, 100, 84, 1…
$ Motivation <chr> "Medium", "Medium", "Medium", "Medium", "High"…
$ LearningStyle <dbl> 0, 0, 0, 0, 0, 1, 0, 0, 3, 2, 0, 1, 2, 3, 1, 1…
$ Sleep <dbl> 6.0, 6.0, NA, 5.8, 5.5, 6.5, 6.2, 6.9, 6.6, 6.…
$ Stress <dbl> 5, 6, 8, 5, 7, 6, 7, 3, 6, 6, 5, 5, 8, 7, 4, 5…
$ ExamScore <dbl> 73, 75, 52, 43, 88, 67, 83, 39, 72, 70, 66, 87…
$ Grade <chr> "B", "B", "C", "D", "A", "B", "A", "D", "B", "…
$ Workshop <chr> "No", "No", "Yes", "No", "No", "No", "No", "Ye…
$ Wellbeing_T1 <dbl> 5.00, 1.33, 3.33, 5.00, 4.00, 2.67, 4.33, 4.33…
$ Wellbeing_T2 <dbl> 5.00, 1.33, 4.33, 3.33, 4.00, 2.00, 5.33, 3.33…
$ Used_Support <chr> "No", "No", "Yes", "Yes", "Yes", "Yes", "Yes",…