# Tutorial CS-6: From a chest-strap recording to a recovery number

Check a chest strap's beat intervals against its own ECG, clean two nights of sleep with a written artifact rule, compute a nightly RMSSD with an honest interval, and find out what two nights can and cannot say about a baseline band.

Address: https://apopt.com/data/tutorials/cs06-strap-recovery/  
License: CC BY 4.0  
Prepared: 2026-12-03

## Description

Files for the tutorial *From a chest-strap recording to a recovery number* (https://apopt.com/course/tutorials/cs06-strap-recovery/). `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/2026-06-26_beats.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/clean/2026-06-26_beats.csv) | 341.1 KB | 18,027 rows | Cleaned copy written by the tutorial |
| [clean/2026-06-28_beats.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/clean/2026-06-28_beats.csv) | 322.6 KB | 17,082 rows | Cleaned copy written by the tutorial |
| [clean/change_log.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/clean/change_log.csv) | 217 B | 6 rows | Cleaned copy written by the tutorial |
| [clean/nightly_rmssd.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/clean/nightly_rmssd.csv) | 152 B | 2 rows | Cleaned copy written by the tutorial |
| [clean/windows.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/clean/windows.csv) | 6.4 KB | 146 rows | Cleaned copy written by the tutorial |
| [expected/printed-output.txt](https://apopt.com/data/tutorials/cs06-strap-recovery/expected/printed-output.txt) | 1.8 KB |  | Everything the tutorial prints, cell by cell |
| [raw/2026-06-26_2347_sleep_rr.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/raw/2026-06-26_2347_sleep_rr.csv) | 304.4 KB | 18,027 rows | the strap's beat intervals for the night of 26 June 2026, one row per beat (t_s seconds from the start, rr_ms, hr_bpm where reported), 18,027 beats |
| [raw/2026-06-28_2343_sleep_excerpt.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/raw/2026-06-28_2343_sleep_excerpt.csv) | 674.9 KB | 23,433 rows | three minutes of raw ECG from the middle of the second night, about 130 samples a second, in the strap's five-column format (time, ecg, hr, rr, marker) |
| [raw/2026-06-28_2343_sleep_rr.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/raw/2026-06-28_2343_sleep_rr.csv) | 276.1 KB | 17,082 rows | the same for the night of 28 June 2026, 17,082 beats |
| [raw/hrv_nightly.csv](https://apopt.com/data/tutorials/cs06-strap-recovery/raw/hrv_nightly.csv) | 202 B | 2 rows | the case file's own nightly summary (median five-minute RMSSD), made by its preparation script, not by the strap; used only for comparison in Step 5 |

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

## Columns

| column | unit | meaning |
|---|---|---|
| t_s | s | time of the beat from the start of the recording |
| rr_ms | ms | interval since the previous beat as timed by the strap |
| hr_bpm | beats/min | the strap's displayed heart rate where it was written on a beat row |
| time (excerpt) | ns since 1970-01-01 UTC | sample time |
| ecg (excerpt) | mV | single-lead ECG |
| rr (excerpt) | ms | strap interval on the rows where one was written |

## Provenance

- Source: The instructor's own Polar H10 recordings (course case file athletes/jh/heart), published under his name
- Removed: nothing beyond the case file's own preparation (names in file names, free-text notes); no location data exists in these files
- Permission basis: Published with the course under CC BY 4.0
- Prepared with: dda/tutorials/build.py

## Used in

- Book: [Chapter 5: Heart Rate, ECG and Heart Rate Variability](https://apopt.com/book/ch05-heart/)
- Course: [Week 5 lesson](https://apopt.com/course/week/5/)
- Homework H10: [https://apopt.com/course/assess/h10/](https://apopt.com/course/assess/h10/)
- Homework H11: [https://apopt.com/course/assess/h11/](https://apopt.com/course/assess/h11/)

## How to cite

Tutorial CS-6: From a chest-strap recording to a recovery number. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/cs06-strap-recovery/

## Load it

```python
import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/cs06-strap-recovery/raw/2026-06-26_2347_sleep_rr.csv")
```
