apopt.com

Data / tutorials / cs04-messy-watch-export

Tutorial CS-4: A messy watch export to a clean table

Tutorial

Take 693 activity summaries in a watch's own field names and units, audit every unit with an identity, write the cleaning rules first, keep a change log, and produce a quarterly running summary a coach can trust.

Files for the tutorial A messy watch export to a clean table (https://apopt.com/course/tutorials/cs04-messy-watch-export/). 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
clean/activities_categorized.csv118.4 KB693 rowsCleaned copy written by the tutorial
clean/change_log.csv223 B7 rowsCleaned copy written by the tutorial
clean/quarter_summary.csv647 B11 rowsCleaned copy written by the tutorial
expected/printed-output.txt5.4 KBEverything the tutorial prints, cell by cell
raw/activities_clean.csv92.0 KB693 rowsthe case file's own conversion of the same activities to SI units with local start times, for checking your conversion
raw/sessions_fit.csv114.5 KB693 rows693 activity summaries, 28 June 2024 to 28 November 2026, one watch; the FIT session fields with the watch's own names and units

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/activities_clean.csv

activity_iddatestart_localsportsub_sportdevicedistance_kmmoving_time_minelapsed_time_minpace_min_per_kmavg_speed_kmhavg_hr_bpmmax_hr_bpmavg_cadence_spmstep_length_melevation_gain_melevation_loss_mavg_power_wcalories_kcalload_au
2024-06-28_0719_running2024-06-282024-06-28T07:19runningCOROS PACE 36.66339.2655.125.89168185172.00.98484511825327.2
2024-06-29_1855_swimming2024-06-292024-06-29T18:55swimmingCOROS PACE 30.0229.519.610.1411758
2024-07-04_0624_running2024-07-042024-07-04T06:24runningCOROS PACE 31.42210.8824.937.65145165154.00.8431590515.6
2024-07-04_0650_running2024-07-042024-07-04T06:50runningCOROS PACE 35.00321.4931.284.3171188180.01.28271516213315.4
2024-07-06_0739_running2024-07-062024-07-06T07:39runningCOROS PACE 310.62472.378.86.81159181154.00.9516518210339944.8
2024-07-08_0734_running2024-07-082024-07-08T07:34runningCOROS PACE 31.6066.266.263.9186202188.01.3689178815.3
2024-07-09_0725_hiking2024-07-092024-07-09T07:25hikingCOROS PACE 35.73109.88109.8819.181151630.63252268033135.6
2024-07-10_0727_running2024-07-102024-07-10T07:27runningCOROS PACE 38.87766.2166.217.46147166158.00.8458589449835.1

First 8 of 693 rows.

Data dictionary

ColumnUnitMeaning
activity_idtextrow id (local start time and sport)
start_timeISO 8601start in UTC (the "Z")
utc_offset_hhlocal clock minus UTC at the start
sport / sub_sporttextsport and sub-sport as the watch labels them
total_timer_timesmoving time (the timer stops on pauses)
total_elapsed_timesclock time from start to stop (pauses included)
total_distancemdistance (wrist accelerometer on indoor runs)
enhanced_avg_speed / enhanced_max_speedm/saverage (over timer time) and maximum speed
avg_running_cadencestrides/min (×2 for steps/min)cadence of ONE foot on runs
avg_cadencepedal rpm (bike); strokes/min (swim); undefined elsewherecadence on other sports
total_stridescountstrides of one foot
avg_step_lengthmmdistance per step
avg_stance_timemsground-contact time
avg_vertical_oscillationmmvertical bounce of the torso
avg_vertical_ratio%oscillation ÷ step length
avg_powerWrunning power the watch estimates
avg_heart_rate / max_heart_ratebeats/minheart rate (optical at the wrist)
total_ascentmclimb (barometer)
total_calorieskcalenergy estimate

Where it came from

  • Source: COROS Training Hub archive of FIT activity files (session summaries only), from the course case file athletes/jh/coros-history
  • Removed: every GPS position and all per-second records; the archive's activity ids and file names; device serial and account identifiers
  • Permission: The athlete publishes his own data with the course
  • Prepared with: dda/tutorials/build.py

Load it

import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/cs04-messy-watch-export/raw/activities_clean.csv")
const text = await (await fetch("https://apopt.com/data/tutorials/cs04-messy-watch-export/raw/activities_clean.csv")).text();

Or download load.py / load.js.

How to cite

Tutorial CS-4: A messy watch export to a clean table. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/cs04-messy-watch-export/