# Tutorial Q-13: Find the beats in ten seconds of ECG

Read the clock of a raw chest-strap ECG file, find every R peak in ten seconds with a band-pass, slope and threshold, and check the count against the strap.

Address: https://apopt.com/data/tutorials/q13-ecg-beats/  
License: CC BY 4.0  
Prepared: 2026-12-03

## Description

Files for the tutorial *Find the beats in ten seconds of ECG* (https://apopt.com/course/tutorials/q13-ecg-beats/). `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 |
|---|---|---|---|
| [expected/printed-output.txt](https://apopt.com/data/tutorials/q13-ecg-beats/expected/printed-output.txt) | 393 B |  | Everything the tutorial prints, cell by cell |
| [raw/2026-06-26_2141_day_excerpt.csv](https://apopt.com/data/tutorials/q13-ecg-beats/raw/2026-06-26_2141_day_excerpt.csv) | 679.2 KB | 23,379 rows | three minutes of the instructor's resting ECG at about 130 samples a second (columns time, ecg, hr, rr, marker) |

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

## Provenance

- Source: Data-Driven Athletics tutorials (IRSRI, 2027)
- Removed: nothing; inputs are synthetic, published course data, or the instructor's own
- 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/)

## How to cite

Tutorial Q-13: Find the beats in ten seconds of ECG. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/q13-ecg-beats/

## Load it

```python
import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/q13-ecg-beats/raw/2026-06-26_2141_day_excerpt.csv")
```
