<!-- Generated by book/tools/make-index.py from the book source. -->

> Hedengren, J. (Ed.) (2027). Appendix J: The Athlete Record. In *Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data* (pp. 515–519). IRSRI Sports Research Institute. CC BY 4.0.

# J The Athlete Record

One test answers “what is it?” The course question is “is it changing?”,
and that needs the same tests, done the same way, kept in one place all term.
This appendix sets out that place: one table, the *athlete record*. It
gives the format and its data dictionary, the weekly and four-times-a-term
measurements as checklists, how to read a progress chart drawn from the record,
and a short script that turns the apps' results files into rows, so you never
retype a number. Each chapter's summary ends with a *Track it* line naming
the number from that chapter that goes in.

> **Limits and cautions: Your record is yours.**
> 
> The record holds personal numbers, some of them about health. It stays on your
> own device and in your own storage. No value in it is graded, shared or compared
> with anyone else's; you hand in methods, charts with the values removed if you
> wish, and code. No one has to exercise hard: every strenuous item below is
> optional, and the instructor's record is the substitute for anyone who does not
> keep their own (Appendix I). The numbers are training
> information, not medical advice.

## J.1 The Format

The record is one CSV file, `athlete-record.csv`, in *long* format:
one number per row. A new test adds rows, never columns, and every metric is
plotted the same way: value against date. Four rules keep it trustworthy.

- **Add rows; never edit or delete one.** A wrong row stays. Add the
corrected row after it, with a `note` saying which row it replaces.

- **One unit per metric**, written at the end of the metric's name
(`jump_height_cm`) and again in `unit`.

- **Every row says what measured it**: the device, the app and its
version, and your protocol version. A change in any of them can move a series by
itself.

- **The raw files stay beside it**: the results files, the strap
recordings, the session sheet. The record points at them; it does not replace
them.

*Table J.1. Data dictionary of `athlete-record.csv`. The columns, in this order, are the same in the course tutorials.*

| Column | Meaning, format and rules | Example |
|---|---|---|
| date | Local date of the session, `YYYY-MM-DD` | 2027-01-08 |
| time | Local time with its offset from UTC, `hh:mm+hh:mm` | 09:05-07:00 |
| test | The protocol, lower case: `cmj`, `resting-hr`, `step-test`, `run-form`, `cs-two-effort` | cmj |
| metric | What was measured, snake case, ending in the unit | jump_height_cm |
| value | A number. Empty when not measured; never 0 for “missing” | 31.2 |
| unit | The unit, matching the end of `metric` | cm |
| trial | Repeat number within the session, from 1 | 2 |
| device | What recorded it, by type and setting, no brand | phone-120fps |
| app | The course app (the word in its address), or `none` for a hand count | jump |
| app_version | The version the app shows. Results files carry only their format version, so a converted row says `format-1`; note an app update when you see one | format-1 |
| protocol_version | Your own label for the written protocol; change it when the camera spot, frame rate, surface or warm-up changes | v1-side-3m |
| conditions | Sleep, illness, soreness, heat, shoes, surface; empty if usual | slept 5 h |
| note | Anything else, including why a row should not be used | retest of trial 2 |

Three rows of a record look like this; the resting pulse is counted by hand, so
its `app` is `none`:

```text
date,time,test,metric,value,unit,trial,device,app,app_version,protocol_version,conditions,note
2027-01-08,09:05-07:00,cmj,jump_height_cm,31.2,cm,1,phone-30fps,jump,format-1,v1-side-3m,,
2027-01-08,09:05-07:00,cmj,flight_time_ms,500,ms,1,phone-30fps,jump,format-1,v1-side-3m,,
2027-01-11,07:10-07:00,resting-hr,resting_hr_bpm,58,bpm,1,hand-60s,none,,v1-seated,slept 7 h,
```

## J.2 What Goes In, and When

The course fills the record on three time scales
(Table J.2). The weekly series gives thirteen
points by week 13, enough for a baseline, a band and a trend. The battery gives
before-and-after comparisons with a typical error measured on you.

*Table J.2. The repeated measurements.*

| When | What | Time | Rows (test: metrics) |
|---|---|---|---|
| Every week (the Monday five) | Three jumps on video and a one-minute resting pulse | 5 min | `cmj`: height, flight time; `resting-hr` |
| Weeks 1, 5, 9, 13 (the battery) | The Monday five; the step test; one running clip at a fixed cadence; optionally a two-effort critical-speed test | 30 min | `step-test`, `run-form`, `cs-two-effort` |
| Week 9, a second day | The jump again, two to seven days later, same protocol | 5 min | `cmj`, for the typical error |
| Continuous, optional | Watch training minutes; morning heart-rate variability | — | weekly minutes; `resting-hr` |

\needspace{14\baselineskip}

### Checklist: the Monday five

{{0.315\linewidth}**Before**

- Same day and time each week, before training.

- Phone on the taped tripod spot, side view, waist height, whole body in
  frame, 60 fps or more; the capture rate written on the session sheet.

- The protocol version on the sheet; a new one if anything changed.

{0.315\linewidth}**During**

- Sit two minutes; count the pulse for 60 seconds
  (Appendix E, P2).

- The usual warm-up; then three countermovement jumps 30 seconds to a
  minute apart, the arm action the same each time (P1).

- Every trial kept, a bad one with its reason.

{0.315\linewidth}**After**

- Run the jump app with the capture rate set; keep the text results and the
  receipt.

- Convert them to rows (Section J.4); type
  the pulse row.

- Fill `conditions`: sleep, illness, soreness, anything unusual.

- Check one number by hand: count one jump's flight frames.

- Never change an earlier row.

}

\needspace{10\baselineskip}

### Checklist: the battery (weeks 1, 5, 9, 13)

- The Monday five first, rested.

- The three-stage step test (P3): heart rate at the end of the last stage
  and one minute after (Chapter 2).

- One running clip from the side at an easy pace with the metronome at the
  natural cadence you found in week 1, same spot and rate each time (P12); the
  running app's cadence, contact time and the modeled force per foot
  (Chapter 9).

- Optional, only if you already train hard: a two-effort critical-speed
  test (Chapter 6).

- Week 9: the jump again on a second day, for the typical error (P16).

- Stop for pain, dizziness or illness; nothing here is required at full
  effort.

## J.3 Reading a Progress Chart

A progress chart is one metric against date. Draw it with the elements of
Table J.3, in that order;
Figure 14.1 in Chapter 14 is an example, and
Section 14.8.2 reads it step by step.

*Table J.3. The parts of a progress chart, and what each tells you.*

| Element | How you get it | What it tells you |
|---|---|---|
| Points | The session value: the mean (or median) of its trials | One point is one session, not one trial |
| Baseline | Mean of the first weeks *after* the first one, which is practice | “Normal for you” at the start |
| Band | Baseline $\pm$ one standard deviation of the baseline weeks, or $\pm$ the typical error of the battery retest (Section 11.1) | How far a week strays with nothing changed |
| Smallest worthwhile change | From the sport, agreed before the retest (Section 11.1.3) | A line a change must clear to matter |
| Run rule | Four of the last five points beyond one band width on the same side (Section 14.8.2) | A pattern rare by chance: look closer |
| Rolling mean | Mean of the last four points | The level, with week-to-week noise damped |
| Change markers | A vertical line where `device`, `app_version` or `protocol_version` changes | A step there is not the athlete |

Then put one status word on the chart, using the decision rule of
Section 11.1.3: the chance that the true change since
the baseline is larger than the smallest worthwhile change.

- **Improved** (or **declined**): the chance is 75% or more,
“likely” or better in Table 11.2, and no change
marker lies between the baseline and the points you compare.

- **No clear change**: the chance is below 25%; the true change is
probably smaller than the smallest worthwhile change.

- **Retest**: anything in between, or a change marker in the way. Repeat
the test with the protocol held fixed before you say anything.

Three habits keep the word honest. Read a single far point as a question, not a
result: an unusually good or bad week tends to be followed by a more ordinary
one, so a change in training made on one point usually looks like it worked.
Read the weeks after a change marker against a new baseline. And say the word
with its range, as in Section 14.8.1.

## J.4 From Results Files to the Record

The movement apps write a text results file and a receipt for every clip
(Appendix F, Section F.1).
Listing J.1 reads a folder of them and appends two
rows per clip, jump height and flight time. The folder holds the seven
**synthetic** jump results of Chapter 4: three clips from week 1
filmed at 30 fps and four from week 3 filmed at 120 fps, one of
them analyzed at the wrong rate on purpose.

**Listing J.1.** Results files to rows of the record (`code/j01_record.py`). (`appJ-record/code/j01_record.py`)

```python
import json, pathlib, re, pandas as pd   # results files -> rows of the record
FILMED = {"wk1": 30, "wk3": 120}            # capture rate, from the session sheet
KEEP = {"Jump Height": ("jump_height_cm", "cm"),
        "Flight Time": ("flight_time_ms", "ms")}
COLS = ("date time test metric value unit trial device app app_version "
        "protocol_version conditions note").split(); rows = []
for md in sorted(pathlib.Path("data/results").glob("results_*.md")):
    r, text = json.loads(md.with_suffix(".json").read_text()), md.read_text("utf-8")
    t = pd.Timestamp(r["savedAt"]).tz_convert("Etc/GMT+7")    # UTC-7, local time
    app, ver = re.search(r"app=(\w+) format=markdown version=(\d+)", text).groups()
    week, trial = md.stem.split("_")[2:]
    fps, used = FILMED[week], r["actualCaptureFps"]
    note = "" if used == fps else f"analyzed at {used} fps, filmed at {fps}: do not use"
    for name, (metric, unit) in KEEP.items():
        v = re.search(rf"^\| [^|]+ \| {name} \| ([\d.]+)", text, re.M)
        rows.append([t.date(), t.isoformat(timespec="minutes")[11:], "cmj", metric,
                     v.group(1) if v else "", unit, trial[1:], f"phone-{fps}fps", app,
                     f"format-{ver}", "v1-side-3m", "", note if v else "not measured"])
rec = pathlib.Path("data/athlete-record.csv")
new = pd.DataFrame(rows, columns=COLS).astype(str)
key = lambda d: d[["date", "time", "test", "metric", "trial"]].agg("|".join, axis=1)
if rec.exists():                                          # append, never rewrite
    new = new[~key(new).isin(key(pd.read_csv(rec, dtype=str)))]
new.to_csv(rec, mode="a", header=not rec.exists(), index=False)
print(f"added {len(new)} rows")
print(new.iloc[8:12, [3, 4, 6, 12]].to_string(index=False))
```

**Listing J.2.** Output of Listing J.1, first run (rows 9–12 of 14).

```text
added 14 rows
        metric value trial                                          note
jump_height_cm  34.1     2                                              
flight_time_ms   533     2                                              
jump_height_cm  32.9     3 analyzed at 30 fps, filmed at 120: do not use
flight_time_ms           3                                  not measured
```

Run it again and it prints `added 0 rows`: it skips any row whose date,
time, test, metric and trial are already in the record, so a folder can be
converted as often as you like. Four details are worth knowing before you adapt
it.

- **The time is the analysis time.** The receipt's `savedAt` is
when the app saved the results, in UTC; the script turns it into local time.
Analyze on the day you film, or replace the date and time with those on your
session sheet.

- **The capture rate comes from your sheet.** The receipt knows only the
rate the analysis used (`actualCaptureFps`). The rate the camera recorded
at is something you write down at the session. When the two differ the row is
still added, with a note, because rows are never dropped silently; the chart
leaves it out.

- **Withheld is not zero.** When the app withholds a value, as it does
for the impossible flight of the wrongly analyzed clip, the cell reads
`N/A` and the row gets an empty value and the note *not measured*.

- **Other apps, other metrics.** Change the names in `KEEP` to the
metric names of the app's Metrics table and `"cmj"` to the test. A resting
pulse or a step-test heart rate has no results file: type those rows, with
`app` set to `none`.
