From 6c693bcc350d1c56b6a5757cbeadc409667b1a20 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Sun, 25 Oct 2020 08:38:32 +0100
Subject: [PATCH 1/3] avoid scientific notation on log axis
---
rowers/interactiveplots.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py
index 68f6d5d2..34bd6634 100644
--- a/rowers/interactiveplots.py
+++ b/rowers/interactiveplots.py
@@ -29,7 +29,9 @@ from bokeh.layouts import layout,widgetbox
from bokeh.palettes import Category20c,Category10
from bokeh.layouts import row as layoutrow
from bokeh.layouts import column as layoutcolumn
-from bokeh.models import LinearAxis,LogAxis,Range1d,DatetimeTickFormatter,HoverTool
+from bokeh.models import (
+ LinearAxis,LogAxis,Range1d,DatetimeTickFormatter,HoverTool,Axis,PrintfTickFormatter
+ )
#from bokeh.io import output_file, show, vplot
from bokeh.models import (
GMapPlot, GMapOptions, ColumnDataSource, Circle,
@@ -2960,6 +2962,8 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
plot.extra_y_ranges = {"watermark": watermarkrange}
plot.sizing_mode = 'scale_width'
+
+
plot.image_url([watermarkurl],1.8*max(thesecs),watermarky,
watermarkw,watermarkh,
global_alpha=watermarkalpha,
@@ -2982,6 +2986,10 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
title = "Critical Power for "+rowername
plot.title.text = title
+ xaxis = plot.select(dict(type=Axis, layout="below"))[0]
+ xaxis.formatter = PrintfTickFormatter(format="%5f")
+ #xaxis.formatter.use_scientific = False
+
hover = plot.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
From 0eb3474fae639d33a7cff08e144b488e7b65fd49 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Sun, 25 Oct 2020 09:00:37 +0100
Subject: [PATCH 2/3] x axis in minutes
---
rowers/interactiveplots.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py
index 34bd6634..d7e89e75 100644
--- a/rowers/interactiveplots.py
+++ b/rowers/interactiveplots.py
@@ -2898,12 +2898,15 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
deltas = powerdf['Delta'].apply(lambda x: timedeltaconv(x))
powerdf['ftime'] = niceformat(deltas)
+ powerdf['Deltaminutes'] = powerdf['Delta']/60.
source = ColumnDataSource(
data = powerdf
)
+
+
# there is no Paul's law for OTW
thesecs = powerdf['Delta']
@@ -2935,7 +2938,7 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
data = dict(
CP = fitpower,
CPmax = ratio*fitpower,
- duration = fitt,
+ duration = fitt/60.,
ftime = ftime,
workout = workouts,
)
@@ -2974,21 +2977,21 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
y_range_name = "watermark",
)
- plot.circle('Delta','CP',source=source,fill_color='red',size=15,
+ plot.circle('Deltaminutes','CP',source=source,fill_color='red',size=15,
legend='Power Data')
- plot.xaxis.axis_label = "Duration (seconds)"
+ plot.xaxis.axis_label = "Duration (minutes)"
plot.yaxis.axis_label = "Power (W)"
plot.y_range = Range1d(0,1.5*max(theavpower))
- plot.x_range = Range1d(1,2*max(thesecs))
+ plot.x_range = Range1d(0.5*min(thesecs)/60.,2*max(thesecs)/60.)
plot.legend.orientation = "vertical"
if not title:
title = "Critical Power for "+rowername
plot.title.text = title
xaxis = plot.select(dict(type=Axis, layout="below"))[0]
- xaxis.formatter = PrintfTickFormatter(format="%5f")
- #xaxis.formatter.use_scientific = False
+ xaxis.formatter = PrintfTickFormatter()
+
hover = plot.select(dict(type=HoverTool))
From 440759a6585df30ab8a4976637583cf621c7532a Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Sun, 25 Oct 2020 09:02:39 +0100
Subject: [PATCH 3/3] order on analysis page
---
rowers/templates/analysis.html | 46 ++++++++++++++--------------
rowers/templates/menu_analytics.html | 10 +++---
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/rowers/templates/analysis.html b/rowers/templates/analysis.html
index e70e4a42..12a5d364 100644
--- a/rowers/templates/analysis.html
+++ b/rowers/templates/analysis.html
@@ -84,6 +84,17 @@
Select workouts and make X-Y charts of averages over various metrics
+
+
+ Critical Power
+
+
+

+
+
+
+ Analyse power vs piece duration to make predictions.
+
Power Progress
@@ -96,29 +107,6 @@
Monitoring power duration evidence from all your workouts. Feel free to explore.
-
- Ranking Pieces
-
-
-

-
-
-
- Analyze your Concept2 ranking pieces over a date range and predict your pace on other pieces.
-
-
-
- Critical Power
-
-
-

-
-
-
- Analyse power vs piece duration to make predictions.
-
-
Alerts
@@ -130,6 +118,18 @@
Need to monitor a metric? Set up automatic alerting and see the reports for your workouts.
+
+
+ Ranking Pieces
+
+
+

+
+
+
+ Analyze your Concept2 ranking pieces over a date range and predict your pace on other pieces.
+
diff --git a/rowers/templates/menu_analytics.html b/rowers/templates/menu_analytics.html
index 7d4d5c2d..28cc9eb4 100644
--- a/rowers/templates/menu_analytics.html
+++ b/rowers/templates/menu_analytics.html
@@ -42,15 +42,15 @@
Power Progress
-
-
- Ranking Pieces
-
-
CP Chart
+
+
+
+ Ranking Pieces
+