Data / tutorials / q31-scale-right
Tutorial Q-31: Scale two features, the right way and the wrong way
Tutorial
Predict running pace from step rate and step length with a nearest-neighbor model, and see what scaling does, and what fitting the scaler on the test runs too does, with only 30 runs.
Files for the tutorial Scale two features, the right way and the wrong way (https://apopt.com/course/tutorials/q31-scale-right/). 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 | What it is |
|---|---|---|---|
| expected/printed-output.txt | 489 B | Everything the tutorial prints, cell by cell | |
| raw/sessions_fit.csv | 114.5 KB | 693 rows | 693 watch activity summaries (FIT session fields), June 2024 to November 2026, in the watch's own units (step length in millimeters, cadence in strides per minute for one foot); this tutorial uses the first 30 outdoor runs |
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/sessions_fit.csv
| activity_id | start_time | utc_offset_h | sport | sub_sport | total_timer_time | total_elapsed_time | total_distance | enhanced_avg_speed | enhanced_max_speed | avg_heart_rate | max_heart_rate | min_heart_rate | avg_running_cadence | max_running_cadence | avg_cadence | total_strides | avg_step_length | avg_stance_time | avg_vertical_oscillation | avg_vertical_ratio | avg_power | total_ascent | total_descent | total_calories | avg_temperature | pool_length | num_active_lengths | Effort Pace |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2024-06-28_0719_running | 2024-06-28T13:19:52Z | -6.0 | running | 2355.33 | 3306.93 | 6663.45 | 2.829 | 3.861 | 168 | 185 | 106 | 86 | 105 | 3309 | 980.0 | 0.0 | 0.0 | 0.0 | 118 | 48 | 45 | 253 | 2.8980000019073486 | |||||
| 2024-06-29_1855_swimming | 2024-06-30T00:55:25Z | -6.0 | swimming | 570.82 | 576.5 | 21.62 | 0.038 | 0.98 | 117 | 80 | 27 | 58 | ||||||||||||||||
| 2024-07-04_0624_running | 2024-07-04T12:24:39Z | -6.0 | running | 652.74 | 1495.9 | 1422.16 | 2.179 | 3.185 | 145 | 165 | 53 | 77 | 105 | 829 | 840.0 | 0.0 | 0.0 | 0.0 | 90 | 3 | 15 | 51 | 2.1589999198913574 | |||||
| 2024-07-04_0650_running | 2024-07-04T12:50:13Z | -6.0 | running | 1289.69 | 1877.08 | 5003.11 | 3.879 | 5.376 | 171 | 188 | 130 | 90 | 127 | 1938 | 1280.0 | 0.0 | 0.0 | 0.0 | 162 | 27 | 15 | 133 | 3.9679999351501465 | |||||
| 2024-07-06_0739_running | 2024-07-06T13:39:37Z | -6.0 | running | 4338.15 | 4727.9 | 10623.63 | 2.449 | 4.348 | 159 | 181 | 95 | 77 | 110 | 5529 | 950.0 | 0.0 | 0.0 | 0.0 | 103 | 165 | 182 | 399 | 2.5439999103546143 | |||||
| 2024-07-08_0734_running | 2024-07-08T13:34:23Z | -6.0 | running | 375.49 | 375.5 | 1606.04 | 4.277 | 5.464 | 186 | 202 | 124 | 94 | 104 | 593 | 1360.0 | 0.0 | 0.0 | 0.0 | 178 | 8 | 9 | 81 | 20 | 4.309999942779541 | ||||
| 2024-07-09_0725_hiking | 2024-07-09T13:25:50Z | -6.0 | hiking | 6592.68 | 6592.69 | 5729.9 | 0.869 | 4.944 | 115 | 163 | 75 | 46 | 630.0 | 0.0 | 0.0 | 0.0 | 0 | 252 | 268 | 331 | 26 | |||||||
| 2024-07-10_0727_running | 2024-07-10T13:27:47Z | -6.0 | running | 3972.56 | 3972.56 | 8877.11 | 2.235 | 3.497 | 147 | 166 | 109 | 79 | 110 | 5227 | 840.0 | 0.0 | 0.0 | 0.0 | 94 | 58 | 58 | 498 | 25 | 2.2769999504089355 |
First 8 of 693 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/q31-scale-right/raw/sessions_fit.csv")const text = await (await fetch("https://apopt.com/data/tutorials/q31-scale-right/raw/sessions_fit.csv")).text();Or download load.py / load.js.
How to cite
Tutorial Q-31: Scale two features, the right way and the wrong way. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/q31-scale-right/