Verified fixture
Defaults come from the public synthetic activity and plan CSVs. The browser uses normalized miles and local date/time fields. The Python reader uses raw metric columns after duplicate display columns.
Project Lab / Synthetic data
Explore how a workout recorded after midnight can leave a planned session uncertain.
Jack Noble · Python implementation and product design · Browser demonstration
All records are synthetic. Try changing activity 2 from 00:30 to 04:00, or move it to the planned date. Run matching to compare the result. Inputs stay in this tab's memory.
JavaScript is required to run the matcher. Inspect the synthetic inputs and expected result below, or run the linked Python example locally.
Expected result for the original synthetic fixture.
A next-day run at 00:30 occurs before 04:00. Review whether it belongs to the October 2 planned session.
A run exists on the planned date.
October 1 and November 5 have no eligible same-date or overnight plan. The ride and race are excluded from training totals.
A completed planned session with positive mileage matches when any run occurs on the same calendar date. If no same-date run exists, a run on the next day before 04:00 is flagged as uncertain. At 04:00 it falls outside the rule. Distance similarity is not a matching criterion. A record can be a candidate for multiple plans; a person must resolve ambiguity.
Training totals include all valid Run activities strictly before race day. The longest run on race day supplies race mileage. Rides and later runs are excluded. The overnight rule examines all runs, just as the Python excerpt does, independently of the training cutoff.
Defaults come from the public synthetic activity and plan CSVs. The browser uses normalized miles and local date/time fields. The Python reader uses raw metric columns after duplicate display columns.
Same-date and unmatched labels explain the excerpt's date tests. They are a demonstration extension, not a one-to-one workout assignment or the private training pipeline. This form rejects invalid inputs; Python skips invalid activity rows.