Merge branch 'feature/minuteaxis' into develop
This commit is contained in:
@@ -29,7 +29,9 @@ from bokeh.layouts import layout,widgetbox
|
|||||||
from bokeh.palettes import Category20c,Category10
|
from bokeh.palettes import Category20c,Category10
|
||||||
from bokeh.layouts import row as layoutrow
|
from bokeh.layouts import row as layoutrow
|
||||||
from bokeh.layouts import column as layoutcolumn
|
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.io import output_file, show, vplot
|
||||||
from bokeh.models import (
|
from bokeh.models import (
|
||||||
GMapPlot, GMapOptions, ColumnDataSource, Circle,
|
GMapPlot, GMapOptions, ColumnDataSource, Circle,
|
||||||
@@ -2896,12 +2898,15 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
|
|
||||||
deltas = powerdf['Delta'].apply(lambda x: timedeltaconv(x))
|
deltas = powerdf['Delta'].apply(lambda x: timedeltaconv(x))
|
||||||
powerdf['ftime'] = niceformat(deltas)
|
powerdf['ftime'] = niceformat(deltas)
|
||||||
|
powerdf['Deltaminutes'] = powerdf['Delta']/60.
|
||||||
|
|
||||||
|
|
||||||
source = ColumnDataSource(
|
source = ColumnDataSource(
|
||||||
data = powerdf
|
data = powerdf
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# there is no Paul's law for OTW
|
# there is no Paul's law for OTW
|
||||||
|
|
||||||
thesecs = powerdf['Delta']
|
thesecs = powerdf['Delta']
|
||||||
@@ -2933,7 +2938,7 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
data = dict(
|
data = dict(
|
||||||
CP = fitpower,
|
CP = fitpower,
|
||||||
CPmax = ratio*fitpower,
|
CPmax = ratio*fitpower,
|
||||||
duration = fitt,
|
duration = fitt/60.,
|
||||||
ftime = ftime,
|
ftime = ftime,
|
||||||
workout = workouts,
|
workout = workouts,
|
||||||
)
|
)
|
||||||
@@ -2960,6 +2965,8 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||||
plot.sizing_mode = 'scale_width'
|
plot.sizing_mode = 'scale_width'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
plot.image_url([watermarkurl],1.8*max(thesecs),watermarky,
|
plot.image_url([watermarkurl],1.8*max(thesecs),watermarky,
|
||||||
watermarkw,watermarkh,
|
watermarkw,watermarkh,
|
||||||
global_alpha=watermarkalpha,
|
global_alpha=watermarkalpha,
|
||||||
@@ -2970,18 +2977,22 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
y_range_name = "watermark",
|
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')
|
legend='Power Data')
|
||||||
plot.xaxis.axis_label = "Duration (seconds)"
|
plot.xaxis.axis_label = "Duration (minutes)"
|
||||||
plot.yaxis.axis_label = "Power (W)"
|
plot.yaxis.axis_label = "Power (W)"
|
||||||
|
|
||||||
plot.y_range = Range1d(0,1.5*max(theavpower))
|
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"
|
plot.legend.orientation = "vertical"
|
||||||
if not title:
|
if not title:
|
||||||
title = "Critical Power for "+rowername
|
title = "Critical Power for "+rowername
|
||||||
plot.title.text = title
|
plot.title.text = title
|
||||||
|
|
||||||
|
xaxis = plot.select(dict(type=Axis, layout="below"))[0]
|
||||||
|
xaxis.formatter = PrintfTickFormatter()
|
||||||
|
|
||||||
|
|
||||||
hover = plot.select(dict(type=HoverTool))
|
hover = plot.select(dict(type=HoverTool))
|
||||||
|
|
||||||
hover.tooltips = OrderedDict([
|
hover.tooltips = OrderedDict([
|
||||||
|
|||||||
@@ -85,29 +85,6 @@
|
|||||||
Select workouts and make X-Y charts of averages over various metrics
|
Select workouts and make X-Y charts of averages over various metrics
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="rounder">
|
|
||||||
<h2>Power Progress</h2>
|
|
||||||
<a href="/rowers/fitness-progress/">
|
|
||||||
<div class="vignet">
|
|
||||||
<img src="/static/img/powerprogress.png" alt="Power Progress">
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<p>
|
|
||||||
Monitoring power duration evidence from all your workouts. Feel free to explore.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li class="rounder">
|
|
||||||
<h2>Ranking Pieces</h2>
|
|
||||||
<a href="/rowers/ote-bests2/">
|
|
||||||
<div class="vignet">
|
|
||||||
<img src="/static/img/rankingpiece.png"
|
|
||||||
alt="Ranking Piece">
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<p>
|
|
||||||
Analyze your Concept2 ranking pieces over a date range and predict your pace on other pieces.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li class="rounder">
|
<li class="rounder">
|
||||||
<h2>Critical Power</h2>
|
<h2>Critical Power</h2>
|
||||||
<a href="/rowers/user-analysis-select/cp/">
|
<a href="/rowers/user-analysis-select/cp/">
|
||||||
@@ -119,6 +96,17 @@
|
|||||||
Analyse power vs piece duration to make predictions.
|
Analyse power vs piece duration to make predictions.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="rounder">
|
||||||
|
<h2>Power Progress</h2>
|
||||||
|
<a href="/rowers/fitness-progress/">
|
||||||
|
<div class="vignet">
|
||||||
|
<img src="/static/img/powerprogress.png" alt="Power Progress">
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
Monitoring power duration evidence from all your workouts. Feel free to explore.
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
<li class="rounder">
|
<li class="rounder">
|
||||||
<h2>Alerts</h2>
|
<h2>Alerts</h2>
|
||||||
<a href="/rowers/alerts/">
|
<a href="/rowers/alerts/">
|
||||||
@@ -130,6 +118,18 @@
|
|||||||
<p>
|
<p>
|
||||||
Need to monitor a metric? Set up automatic alerting and see the reports for your workouts.
|
Need to monitor a metric? Set up automatic alerting and see the reports for your workouts.
|
||||||
</p>
|
</p>
|
||||||
|
</li>
|
||||||
|
<li class="rounder">
|
||||||
|
<h2>Ranking Pieces</h2>
|
||||||
|
<a href="/rowers/ote-bests2/">
|
||||||
|
<div class="vignet">
|
||||||
|
<img src="/static/img/rankingpiece.png"
|
||||||
|
alt="Ranking Piece">
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
Analyze your Concept2 ranking pieces over a date range and predict your pace on other pieces.
|
||||||
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -42,15 +42,15 @@
|
|||||||
<i class="far fa-watch-fitness fa-fw"></i> Power Progress
|
<i class="far fa-watch-fitness fa-fw"></i> Power Progress
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li id="fitness-ranking">
|
|
||||||
<a href="/rowers/ote-bests2/">
|
|
||||||
<i class="fas fa-star fa-fw"></i> Ranking Pieces
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li id="fitness-otecp">
|
<li id="fitness-otecp">
|
||||||
<a href="/rowers/user-analysis-select/cp/">
|
<a href="/rowers/user-analysis-select/cp/">
|
||||||
<i class="fas fa-user-chart fa-fw"></i> CP Chart
|
<i class="fas fa-user-chart fa-fw"></i> CP Chart
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
|
<li id="fitness-ranking">
|
||||||
|
<a href="/rowers/ote-bests2/">
|
||||||
|
<i class="fas fa-star fa-fw"></i> Ranking Pieces
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user