FROM DATA TO THESIS
  • Home
  • Book
  • Playground
  • Slides
  • Get the data
  • PDF Book
  1. Interactive Playground
  • Interactive Playground
  • Foundations of Python Programming and Data Handling
    • 1 Getting Started with Python
    • 2 Data Structures in Python
    • 3 Data Manipulation
    • 4 Data Visualization
  • Statistical Analysis for Research
    • 5 From Research Question to Data
    • 6 Descriptive Statistics and Exploratory Data Analysis
    • 7 Hypothesis Testing and Statistical Inference
    • 8 ANOVA and Regression
    • 9 Multivariate Statistical Methods
    • 10 Mixed-Effects Models
  • Machine Learning with Python
    • 11 Introduction to Machine Learning in Python
    • 12 Classification Models
    • 13 Predictive Regression
    • 14 Advanced Clustering
    • 15 Neural Networks
    • 16 Time Series Forecasting
  • Reproducible Research and Applications
    • 17 Reproducible Research
    • 18 Using AI with Python
    • 19 Putting It All Together

Interactive Playground

Practise every chapter directly in your browser or download self-contained Python projects

WebAssembly · In-Browser Python (Pyodide)

Interactive Python Playground

Practise data science directly in your web browser—no local installation required—or download self-contained chapter project packages containing full datasets, starter scripts, and worked model solutions for your IDE.

19 Interactive Chapters
600-Student Empirical Dataset
Complete Verified Solutions
Ready-to-Run Starter ZIPs

1. Practise in Your Browser

Each playground page compiles and runs Python code right in your browser via Pyodide and quarto-live. Type your code, inspect plots inline, and test your hypotheses with zero software setup.

2. Download Chapter Projects

Download the self-contained .zip package for any chapter to practise in VS Code, Positron, or JupyterLab. Each package contains the study CSVs, starter Python scripts, and clean reference solutions.

Every Chapter Works in Four Progressive Stages:

1

Practise the Chapter

Repeat the textbook's core methods on the case study with starter templates, progressive hints, and verifiable solutions.

2

Go Further

Tackle advanced questions, edge cases, simulations, and real-world comparative benchmark datasets.

3

Check Understanding

Quick conceptual and diagnostic questions with model answers revealed on click to test your theoretical foundation.

4

Do It Yourself

Open-ended thesis tasks without scaffolding—empty code cells where you formulate the strategy and write the implementation.

Part 1: Foundations of Python Programming and Data Handling

Chapters 1 – 4
Chapter 01
python lists

Getting Started with Python

Variables, basic data types, lists, functions, arithmetic operations, and analyzing supervisor sleep records.

Open Playground .zip
Chapter 02
pandas DataFrame

Data Structures in Python

pandas DataFrames, Series, column indexing, data types, missing value checks, and survey inspection.

Open Playground .zip
Chapter 03
query merge

Data Manipulation

Filtering rows, selecting columns, computing composite scores, grouping, pivoting, and merging longitudinal semesters.

Open Playground .zip
Chapter 04
seaborn matplotlib

Data Visualization

Designing publication-ready figures: histograms, KDE density curves, boxplots, violin plots, and multi-facet scatterplots.

Open Playground .zip

Part 2: Statistical Analysis for Research

Chapters 5 – 10
Chapter 05
constructs scales

From Research Question to Data

Translating research questions into testable variables, Likert reverse coding, and calculating validated composite scales.

Open Playground .zip
Chapter 06
scipy.stats EDA

Descriptive Statistics & EDA

Central tendency, dispersion, interquartile ranges, skewness, kurtosis, and Shapiro-Wilk normality diagnostics.

Open Playground .zip
Chapter 07
t-test chi2

Hypothesis Testing & Inference

Independent and paired t-tests, Mann-Whitney U, Wilcoxon signed-rank tests, Chi-Square contingency tables, and effect sizes.

Open Playground .zip
Chapter 08
statsmodels ANOVA

ANOVA and Regression

One-way and two-way factorial ANOVA, Tukey HSD post-hoc comparisons, OLS linear regression, and residual assumption checks.

Open Playground .zip
Chapter 09
PCA multivariate

Multivariate Statistical Methods

Multiple regression with interaction terms, multicollinearity diagnostics (VIF), and Principal Component Analysis dimensionality reduction.

Open Playground .zip
Chapter 10
MixedLM longitudinal

Mixed-Effects Models

Hierarchical linear models for repeated measures: random intercepts, random slopes, intraclass correlation (ICC), and longitudinal growth.

Open Playground .zip

Part 3: Machine Learning with Python

Chapters 11 – 16
Chapter 11
scikit-learn pipelines

Introduction to Machine Learning

Supervised vs unsupervised workflows, stratified train/test splits, StandardScaler preprocessing, cross-validation, and metrics.

Open Playground .zip
Chapter 12
RandomForest ROC-AUC

Classification Models

Logistic Regression, Decision Trees, and Random Forests predicting student retention, dropout risk, and confusion matrix evaluation.

Open Playground .zip
Chapter 13
Ridge Lasso

Predictive Regression

Regularization techniques: Ridge (L2), Lasso (L1), and ElasticNet for multicollinear thesis predictors and automated feature selection.

Open Playground .zip
Chapter 14
KMeans DBSCAN

Advanced Clustering

Unsupervised clustering: K-Means, hierarchical agglomerative clustering with dendrograms, and silhouette validation of student profiles.

Open Playground .zip
Chapter 15
neural-net MLP

Neural Networks

Multi-Layer Perceptrons (MLPClassifier / MLPRegressor): architecting hidden layers, activation functions, loss curves, and non-linear patterns.

Open Playground .zip
Chapter 16
ARIMA forecasting

Time Series Forecasting

Decomposing seasonal trends, autocorrelation (ACF/PACF), rolling metrics, and ARIMA forecasting for longitudinal student metrics.

Open Playground .zip

Part 4: Reproducible Research and Applications

Chapters 17 – 19
Chapter 17
quarto reproducibility

Reproducible Research

Authoring reproducible documents with Quarto: computational reports, parameterization, automated APA tables, and bibliography management.

Open Playground .zip
Chapter 18
LLM-prompting NLP

Using AI with Python

Collaborating with LLM coding assistants: debugging tracebacks, automated qualitative open-response coding, and academic verification rigor.

Open Playground .zip
Chapter 19
capstone full-pipeline

Putting It All Together

The complete thesis capstone: executing an end-to-end reproducible research workflow from raw survey CSVs to a defended results chapter.

Open Playground .zip
Direct Download: Study Case Datasets (.csv)

All playground pages and downloadable project zips work on the study data files. You can also download any individual dataset directly:

students.csv semesters.csv questionnaire.csv supervisors.csv counselling_visits.csv open_responses.csv ai_coding_results.csv
NoteAbout the Study Case Data

The 600-student dataset used across the playground exercises was synthesized by a computer program to provide realistic empirical properties (including true positive effects, subtle interactions, and honest null findings). It does not represent real persons and should be utilized exclusively for academic learning and methodological practice.

1 Getting Started with Python

© Polla Fattah. FROM DATA TO THESIS: Using Python for Non-Technical.

 

Built with Quarto