Tool (free) for graphical comparison of c2 stroke data.

Not sure where you should be posting? Put it here.
Post Reply
HornetMaX
5k Poster
Posts: 542
Joined: September 14th, 2021, 5:41 am

Tool (free) for graphical comparison of c2 stroke data.

Post by HornetMaX » January 7th, 2025, 1:37 pm

Hi all,

I had to take a forced break from training and used the spare time to write some (probably bad) code for a tool that essentially compares c2 stroke data across different workout/sessions (I'm sure it works for RowErg and SkiErg, maybe also for BikeErg but I don't have one so I cannot check). Here's an example of what it does:

Image

Link to the source code (python): here

A bit of explanation on how to use it:
  1. It's python code so you'll have to install python 3.11, and a few packages (pandas, matplotlib and tk, if I recall correctly, they will also install their dependencies, automatically). After installing python, just run from a shell "pip install pandas" and the same for matplotlib and tk.
  2. You run it from a shell like "python c2plot --help" to see the different command line options. In a nutshell if you pass one or more c2 .csv files it will show them, else it will open a file selection dialog to allow you to handpick the .csv files you want to graph. You can pass/pick one or more .csv files (2 in the example above).
  3. Once the graph is on you'll see:
    • Three rows of plots, for "Heart Rate", "Pace" and "Stroke Rate" (I can easily add Watts and Cal/Hr but I don't see the point, maybe Watts makes sense or I can let you chose via command-line options).
    • One column of plots for each interval in your workouts: in the example above I'm comparing 2 sessions, each being a 4x1000m, so you have 4 columns.
    • The solid line are the actual data (either raw data, or a centred moving average to smooth things out a bit, see the command-line options for details), the dashed lines are averages over the time range currently displayed: this means that if you zoom on a part of the x axis (time), the average will change.
  4. You can interact with the plot with the buttons at the bottom:
    • The lens icon allow to zoom (a rectangle by default, but if you press 'x' or 'y' while clicking & dragging it will only zoom in x or y axis). When you zoom in y axis, it will zoom for the entire row of plots. When you zoom in x axis, it will zoom for the entire column of plots.
    • The cross icon allows to pan (when you are zoomed in) by clicking & dragging.
    • The sliders icon allows to tweak some graph spacing settings.
    • The disk icon is to save to an image.
    • Left and Right arrows icons are sort of "Undo" & "Redo".
    • The home icon resets everything.
    • If you click near a data line, you'll see a tooltip with the numerical values of the selected point.
  5. Close the graph to go back to your shell.
  6. If your files are named as per concept2 convention (e.g. concept2-result-96306722.csv), it will only keep the numerical part as a label, else it will keep the entire file name (just to make the legends a bit smaller).
Tool is free, feel free to use, improve, make suggestions and/or ask for features.
1973, 173cm (5'8"), LW, started rowing Sep 2021 (after 10 years of being a couch potato), c2 log
RowErg PBs:
Image

Sakly
Half Marathon Poster
Posts: 3593
Joined: January 13th, 2022, 10:49 am

Re: Tool (free) for graphical comparison of c2 stroke data.

Post by Sakly » January 7th, 2025, 5:05 pm

That's a very nice tool :)
If I would have a PC in use, I definitely would try it. But my machine is so old, I only use it once in a year and do all my stuff with my smartphone :?
Male - '80 - 82kg - 177cm - Start rowErg Jan 2022
1': 358m
4': 1217m
30'r20: 8068m
30': 8,283m
60': 16,222m
100m: 0:15.9
500m: 1:26.0
1k: 3:07.8
2k: 6:37.1
5k: 17:26.2
6k: 21:03.5
10k: 36:01.5
HM: 1:18:40.1
FM: 2:52:32.6
My log

Nomark
500m Poster
Posts: 75
Joined: November 13th, 2024, 1:37 pm

Re: Tool (free) for graphical comparison of c2 stroke data.

Post by Nomark » January 8th, 2025, 3:14 am

Wow, that looks awesome. I love data (a little too much) so will definitely be checking this out later. Thanks for making it.
M 1982 6'1 205lbs

p_b82
6k Poster
Posts: 649
Joined: August 8th, 2022, 1:24 pm
Location: South Somerset, UK

Re: Tool (free) for graphical comparison of c2 stroke data.

Post by p_b82 » January 8th, 2025, 5:22 am

I'm sure I'll pull it down at some point and have a play around with it, I also like data!

- python is embedded in my linux distro, so just have a few modules to install I reckon.

Spent some time about 10 years ago playing around with tk - even have a book - so there may even be a chance I can make some constructive comments
M 6'4 born:'82
PB's
'23: HM=1:36:08.0, 60'=13,702m
'24: 500m=1:37.7, 2k=7:44.80, 5k=20:42.9, 10k=42:13.1, FM=3:18:35.4, 30'=7,132m
'25: 6k: 25:05.4
Logbook

User avatar
Ombrax
10k Poster
Posts: 1783
Joined: April 20th, 2013, 2:05 am
Location: St Louis, MO, USA

Re: Tool (free) for graphical comparison of c2 stroke data.

Post by Ombrax » January 10th, 2025, 10:30 pm

Very nice!

I see I'm not the only one who's faced the hassle of formatting erg pace time and displaying it in the traditional manner...

HornetMaX
5k Poster
Posts: 542
Joined: September 14th, 2021, 5:41 am

Re: Tool (free) for graphical comparison of c2 stroke data.

Post by HornetMaX » January 11th, 2025, 5:09 am

Ombrax wrote:
January 10th, 2025, 10:30 pm
Very nice!

I see I'm not the only one who's faced the hassle of formatting erg pace time and displaying it in the traditional manner...
I've just been lazy, it's surely doable with a few extra lines of code.
First time I'm bored I'll have a look.

BTW, I'm very impressed that the whole thing is roughly 200 lines of code, including empty lines, comments and a lot of boilerplate code.
1973, 173cm (5'8"), LW, started rowing Sep 2021 (after 10 years of being a couch potato), c2 log
RowErg PBs:
Image

Post Reply