About the DSPA3 Interactive Labs
This collection is a browser-native companion to Data Science and Predictive Analytics (DSPA3), the SOCR textbook by Ivo Dinov. Where the book teaches with R and R Markdown, these labs run entirely in your browser in TypeScript — no installation, no server round trip, and no data leaving your machine.
What a lab is
Every lab is built around one idea that is easy to state and easy to get wrong. It opens with a prediction prompt, hands you the controls that matter, and shows the consequences immediately in linked graphics. Documentation, the mathematics, a “try this” sequence, and the equivalent DSPA3 R code sit in tabs beside the instrument, so a lab works as a classroom demonstration, a homework exercise, or a self-study session.
For students
- Predict before you observe — the gate records your guess and then reveals the answer.
- Every configuration has a permalink, so a scenario you found can be pasted into a discussion board or a lab report.
- The R bridge tab shows the code that reproduces the current state in the textbook's own environment.
For teachers
- Teacher mode adds discussion prompts, misconception framing, and the numbers worth putting on the board.
- Presets are pre-built scenarios: a clean case, a pathological case, and the borderline case that generates argument.
- Because state lives in the URL, a lecture can be assembled as an ordered list of permalinks and reproduced identically each term.
How it is built
Deliberately lightweight and extensible.
- A pure TypeScript numerics kernel: seeded RNG and samplers, summary statistics and density estimation, QR / OLS / eigen and SVD routines, clustering, coordinate-descent LASSO, and classification metrics.
- A small SVG plotting layer written for this project, so charts stay fast, accessible, and consistent instead of pulling in a heavy charting dependency.
- A single LabDefinition contract. The shell, catalogue, search, documentation panel, and R bridge read nothing else — adding a lab is one folder plus one registry line.
- Zod-validated state with a compact URL codec, plus downloadable lab files.
Coverage
8 live labs, 42 mapped in total.
- Foundations & Data Quality Ch 1, 2
- Foundations, Data Science, Ethics, and the R Environment · Data Quality, Missingness, and Exploratory Visual Analytics
- Mathematical Core Ch 3, 4
- Linear Algebra, Matrix Computing, and Regression · Linear and Nonlinear Dimensionality Reduction
- Supervised Learning Ch 5, 6
- Supervised Classification · Black-Box Methods: Neural Networks, SVM, and Ensembles
- Unsupervised Learning & Text Ch 7, 8
- Text Mining, NLP, and Association Rule Learning · Unsupervised Clustering
- Validation & Feature Selection Ch 9, 11
- Model Performance Assessment and Validation · Variable Importance and Controlled Feature Selection
- Systems & Performance Ch 10
- Big Data, Formats, and Computational Performance
- Temporal & Longitudinal Ch 12
- Time Series, Longitudinal, and Survival Analysis
- Optimization Ch 13
- Optimization and Numerical Methods
- Deep Learning Ch 14
- Deep Learning and Representation Learning
Credits and reuse
DSPA3 and these labs are part of the Statistics Online Computational Resource (SOCR) at the University of Michigan. The labs are intended for open educational use; please cite the textbook when you adapt them for a course.
