# Tutorial CS-13: Predicting peak left-leg force

Reproduce the course regression of peak left-foot force from gait measures, then find out why its R² of 0.94 does not hold for a new runner, and what physics adds.

Address: https://apopt.com/data/tutorials/cs13-peak-force/  
License: CC BY 4.0 (tutorial); the data files are redistributed from the Data-Driven Engineering course with credit  
Prepared: 2026-12-03

## Description

Files for the tutorial *Predicting peak left-leg force* (https://apopt.com/course/tutorials/cs13-peak-force/). `raw/` holds the inputs as the device or app wrote them; `clean/` holds the cleaned copies the tutorial writes; `expected/` holds what a correct run prints and saves, so you can check your own run.

## Files

| file | size | rows | description |
|---|---|---|---|
| [clean/biomechanics_clean.csv](https://apopt.com/data/tutorials/cs13-peak-force/clean/biomechanics_clean.csv) | 219.0 KB | 2,568 rows | Cleaned copy written by the tutorial |
| [clean/change_log.csv](https://apopt.com/data/tutorials/cs13-peak-force/clean/change_log.csv) | 134 B | 3 rows | Cleaned copy written by the tutorial |
| [expected/printed-output.txt](https://apopt.com/data/tutorials/cs13-peak-force/expected/printed-output.txt) | 2.3 KB |  | Everything the tutorial prints, cell by cell |
| [raw/biomechanics.txt](https://apopt.com/data/tutorials/cs13-peak-force/raw/biomechanics.txt) | 212.1 KB |  | one row per left-foot step on an instrumented treadmill, nine gait measures and the peak force (2,625 rows) |
| [raw/biomechanics2.txt](https://apopt.com/data/tutorials/cs13-peak-force/raw/biomechanics2.txt) | 1.0 MB |  | the same kind of steps with both legs and 49 columns, for the challenge (2,975 rows) |

Large files are stated with their size. A `preview.md` in this folder shows the first rows of each table.

## Columns

| column | unit | meaning |
|---|---|---|
| speed | m/s | treadmill speed |
| lgt | s | left-foot ground contact time |
| sr | strides/s | stride rate |
| sl | m | stride length |
| lkneeswing | degrees | left knee angle at peak swing flexion |
| lhipflex | degrees | left hip peak flexion |
| lhipext | degrees | left hip peak extension |
| lcmvert | m | vertical travel of the center of mass |
| lkneesep | m | distance between the knees at toe-off |
| lcmtoe | m | center of mass to toe at contact |
| lpeakforce | body weights | left-foot peak vertical force (target) |

## Provenance

- Source: Data-Driven Engineering course, Biomechanic Regression case study (apmonitor.com/dde); data courtesy of Iain Hunter, BYU Biomechanics
- Removed: nothing; the files are published by the course as they are. The name and e-mail columns of biomechanics2.txt hold only placeholders
- Permission basis: Published with the course under CC BY 4.0
- Prepared with: dda/tutorials/build.py

## Used in

- Book: [Chapter 9: Gait and Cyclic Sports](https://apopt.com/book/ch09-gait/)
- Course: [Week 9 lesson](https://apopt.com/course/week/9/)
- Homework P19: [https://apopt.com/course/assess/p19/](https://apopt.com/course/assess/p19/)
- Homework P22: [https://apopt.com/course/assess/p22/](https://apopt.com/course/assess/p22/)

## How to cite

Tutorial CS-13: Predicting peak left-leg force. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/cs13-peak-force/

## Load it

```python
import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/cs13-peak-force/clean/biomechanics_clean.csv")
```
