apopt.com

Data / tutorials / q33-rolling-band

Tutorial Q-33: A rolling mean and a band

Tutorial

Set a baseline band from four weeks of simulated morning heart rate, add a seven-day rolling mean that looks back only, and see which of the two shows a real rise first.

Files for the tutorial A rolling mean and a band (https://apopt.com/course/tutorials/q33-rolling-band/). 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

FileSizeRowsWhat it is
expected/printed-output.txt313 BEverything the tutorial prints, cell by cell
raw/morning_hr_simulated.csv558 B42 rowsSIMULATED: 42 mornings of resting heart rate with a 4 bpm rise after day 35, and the book's own 7-day rolling mean (`roll7`) to check against

Every file has its own fixed address: copy a link and load it directly. preview.md shows the first rows of each table as text; datapackage.json lists columns, sizes and checksums.

Preview of raw/morning_hr_simulated.csv

dayhrroll7
152.0
250.3
348.3
449.6
551.7
654.3
753.451.37
851.551.3

First 8 of 42 rows.

Where it came from

  • Source: Data-Driven Athletics tutorials (IRSRI, 2027)
  • Removed: nothing; inputs are synthetic, published course data, or the instructor's own
  • Permission: Published with the course under CC BY 4.0
  • Prepared with: dda/tutorials/build.py

Load it

import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/q33-rolling-band/raw/morning_hr_simulated.csv")
const text = await (await fetch("https://apopt.com/data/tutorials/q33-rolling-band/raw/morning_hr_simulated.csv")).text();

Or download load.py / load.js.

How to cite

Tutorial Q-33: A rolling mean and a band. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/q33-rolling-band/