source("R/00_generate_datasets.R")Datasets
Three synthetic medical education datasets
Every value is generated by R/00_generate_datasets.R with set.seed(20260909). No real student, faculty member or institution is represented. The structure and relationships are plausible for an Indian medical college cohort, which is what makes them useful for teaching, and useless for publication.
Download
Save all four files into the data/ folder of your RStudio project.
| File | Rows | What it is |
|---|---|---|
meded_students.csv |
240 | One row per student: demographics, teaching arm, pre/post-test, burnout |
osce_stations.csv |
1,200 | One row per student × OSCE station: scores, examiner, domain |
faculty_survey_raw.csv |
132 | A deliberately messy Google Form export, for cleaning practice |
codebook.csv |
— | Variable dictionary for all of the above |
Or, if you would rather generate them yourself:
The teaching scenario
Three government medical colleges ran a module on evidence-based practice. Students were allocated to one of two teaching arms (traditional lecture or flipped classroom) and assessed with a knowledge test before and after, plus a five-station OSCE. A parallel survey asked faculty about their own research and data practices.
That single scenario carries the whole workshop: ggplot2 on Day 1 morning, dplyr on Day 1 afternoon, gtsummary on Day 2 morning, and the group activity on Day 2 afternoon.
meded_students.csv
library(tidyverse)
students <- read_csv("data/meded_students.csv")
glimpse(students)Key variables:
| Variable | Type | Notes |
|---|---|---|
student_id |
chr | Links to osce_stations.csv |
teaching_arm |
chr | Traditional lecture / Flipped classroom, the exposure |
pretest, posttest |
dbl | Knowledge, 0–100. posttest has 11 missing values |
gain |
dbl | posttest − pretest, missing wherever posttest is |
attendance_pct |
dbl | 45–100 |
burnout_score |
dbl | 0–100, higher is worse. 7 missing |
burnout_band |
chr | Low / Moderate / High |
satisfaction |
dbl | 1–5 Likert |
passed |
chr | Yes if posttest ≥ 50 |
Eleven students have no post-test. You will meet them the first time you run mean(students$posttest) and get NA. That is not a bug in the data; it is the most common surprise in real analysis, and it is better to meet it here.
osce_stations.csv
Long format: five rows per student, one per station. This is the file we use to teach group_by(), summarise() and joins.
| Station | Name | Domain |
|---|---|---|
| ST1 | History taking | Communication |
| ST2 | Clinical examination | Clinical skill |
| ST3 | Procedure: IV access | Procedural skill |
| ST4 | Counselling | Communication |
| ST5 | Data interpretation | Cognitive |
Scores are out of 20. Procedural and cognitive stations are marked harder: a real pattern worth discovering rather than being told.
faculty_survey_raw.csv
This one is ugly on purpose. It contains:
- Column names with spaces, punctuation and question text
Departmentrecorded asPaediatrics,Pediatrics,physiology,Anatomy- Dates in four different formats
- Missing values coded as
"",NA,-andunknown - Twelve duplicated rows
- Free-text comments with leading and trailing whitespace
If your cleaned version has 120 rows and tidy snake_case names, you have won.
Loading everything at once
library(tidyverse)
students <- read_csv("data/meded_students.csv")
osce <- read_csv("data/osce_stations.csv")
faculty <- read_csv("data/faculty_survey_raw.csv")
# Sanity check
dim(students) # 240 x 17
dim(osce) # 1200 x 8
dim(faculty) # 132 x 11If those dimensions do not match, you have an incomplete download. Fetch the files again rather than debugging your code.