Added Average/Peak Force Ratio
This commit is contained in:
@@ -99,7 +99,9 @@ def dataprep(rowdatadf,bands=False,barchart=False,otwpower=False):
|
||||
|
||||
peakforce = rowdatadf.ix[:,' PeakDriveForce (lbs)']
|
||||
|
||||
|
||||
forceratio = averageforce/peakforce
|
||||
forceratio = forceratio.fillna(value=0)
|
||||
|
||||
f = rowdatadf['TimeStamp (sec)'].diff().mean()
|
||||
windowsize = 2*(int(10./(f)))+1
|
||||
if windowsize <= 3:
|
||||
@@ -109,6 +111,7 @@ def dataprep(rowdatadf,bands=False,barchart=False,otwpower=False):
|
||||
spm = savgol_filter(spm,windowsize,3)
|
||||
hr = savgol_filter(hr,windowsize,3)
|
||||
drivelength = savgol_filter(drivelength,windowsize,3)
|
||||
forceratio = savgol_filter(forceratio,windowsize,3)
|
||||
|
||||
t2 = t.fillna(method='ffill').apply(lambda x: timedeltaconv(x))
|
||||
|
||||
@@ -117,6 +120,7 @@ def dataprep(rowdatadf,bands=False,barchart=False,otwpower=False):
|
||||
|
||||
|
||||
drivespeed = drivelength/rowdatadf[' DriveTime (ms)']*1.0e3
|
||||
drivespeed = drivespeed.fillna(value=0)
|
||||
driveenergy = drivelength*averageforce*4.44822
|
||||
distance = rowdatadf.ix[:,'cum_dist']
|
||||
|
||||
@@ -139,6 +143,7 @@ def dataprep(rowdatadf,bands=False,barchart=False,otwpower=False):
|
||||
averageforce=averageforce,
|
||||
drivelength=drivelength,
|
||||
peakforce=peakforce,
|
||||
forceratio=forceratio,
|
||||
distance=distance,
|
||||
drivespeed=drivespeed,
|
||||
)
|
||||
@@ -186,4 +191,7 @@ def dataprep(rowdatadf,bands=False,barchart=False,otwpower=False):
|
||||
data['fergpace'] = nicepaceformat(ergpace)
|
||||
data['fnowindpace'] = nicepaceformat(nowindpace)
|
||||
|
||||
data = data.replace([-np.inf,np.inf],np.nan)
|
||||
data = data.fillna(method='ffill')
|
||||
|
||||
return data
|
||||
|
||||
@@ -590,6 +590,7 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
|
||||
'averageforce': 'Average Drive Force (lbs)',
|
||||
'drivelength': 'Drive Length (m)',
|
||||
'peakforce': 'Peak Drive Force (lbs)',
|
||||
'forceratio': 'Average/Peak Drive Force Ratio',
|
||||
'driveenergy': 'Work per Stroke (J)',
|
||||
'drivespeed': 'Drive Speed (m/s)',
|
||||
'None': '',
|
||||
@@ -605,6 +606,7 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
|
||||
'power': 0,
|
||||
'averageforce': 0,
|
||||
'peakforce': 0,
|
||||
'forceratio':0,
|
||||
'drivelength':0.5,
|
||||
'driveenergy': 0,
|
||||
'drivespeed': 0,
|
||||
@@ -617,6 +619,7 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
|
||||
'power': 600,
|
||||
'averageforce':200,
|
||||
'peakforce':400,
|
||||
'forceratio':1,
|
||||
'drivelength':2.0,
|
||||
'driveenergy': 1000,
|
||||
'drivespeed':4,
|
||||
@@ -922,6 +925,7 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
'averageforce': 'Average Drive Force (lbs)',
|
||||
'drivelength': 'Drive Length (m)',
|
||||
'peakforce': 'Peak Drive Force (lbs)',
|
||||
'forceratio': 'Average/Peak Drive Force Ratio',
|
||||
'driveenergy': 'Work per Stroke (J)',
|
||||
'drivespeed': 'Drive Speed (m/s)',
|
||||
'None': '',
|
||||
@@ -934,6 +938,7 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
'power': 0,
|
||||
'averageforce': 0,
|
||||
'peakforce': 0,
|
||||
'forceratio':0,
|
||||
'drivelength':0.5,
|
||||
'driveenergy': 0,
|
||||
'drivespeed': 0,
|
||||
@@ -946,6 +951,7 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
'power': 600,
|
||||
'averageforce':200,
|
||||
'peakforce':400,
|
||||
'forceratio':1,
|
||||
'drivelength':2.0,
|
||||
'driveenergy': 1000,
|
||||
'drivespeed':4,
|
||||
@@ -1365,6 +1371,7 @@ def interactive_comparison_chart(id1=0,id2=0,xparam='distance',yparam='spm',
|
||||
'averageforce': 'Average Drive Force (lbs)',
|
||||
'drivelength': 'Drive Length (m)',
|
||||
'peakforce': 'Peak Drive Force (lbs)',
|
||||
'forceratio': 'Average/Peak Drive Force Ratio',
|
||||
'driveenergy': 'Work per Stroke (J)',
|
||||
'drivespeed': 'Drive Speed (m/s)',
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
<a class="button blue small alpha" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/spm/{{ yparam }}/scatter">SPM</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/peakforce/{{ yparam }}/scatter">Peak Force</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/averageforce/{{ yparam }}/scatter">Average Force</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/forceratio/{{ yparam }}/scatter">Average/Peak Force Ratio</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/drivelength/{{ yparam }}/scatter">Drive Length</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/driveenergy/{{ yparam }}/scatter">Work per Stroke</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/drivespeed/{{ yparam }}/scatter">Drive Speed</a>
|
||||
@@ -91,6 +92,7 @@
|
||||
<a class="button rosy small" href="/rowers/promembership">SPM (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||
@@ -109,12 +111,14 @@
|
||||
{% if promember %}
|
||||
<a class="button blue small" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/{{ xparam }}/peakforce/{{ plottype }}">Peak Force</a>
|
||||
<a class="button blue small" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/{{ xparam }}/averageforce/{{ plottype }}">Average Force</a>
|
||||
<a class="button blue small" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/{{ xparam }}/forceratio/{{ plottype }}">Average/Peak Force Ratio</a>
|
||||
<a class="button blue small" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/{{ xparam }}/drivelength/{{ plottype }}">Drive Length</a>
|
||||
<a class="button blue small" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/{{ xparam }}/driveenergy/{{ plottype }}">Work per Stroke</a>
|
||||
<a class="button blue small" href="/rowers/workout/compare/{{ id1 }}/{{ id2 }}/{{ xparam }}/drivespeed/{{ plottype }}">Drive Speed</a>
|
||||
{% else %}
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
{% endif %}
|
||||
@@ -143,4 +147,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<a class="button blue small alpha" href="/rowers/flexall/spm/{{ yparam1 }}/{{ yparam2 }}">SPM</a>
|
||||
<a class="button blue small alpha" href="/rowers/flexall/peakforce/{{ yparam1 }}/{{ yparam2 }}">Peak Force</a>
|
||||
<a class="button blue small alpha" href="/rowers/flexall/averageforce/{{ yparam1 }}/{{ yparam2 }}">Average Force</a>
|
||||
<a class="button blue small alpha" href="/rowers/flexall/forceratio/{{ yparam1 }}/{{ yparam2 }}">Average/Peak Force Ratio</a>
|
||||
<a class="button blue small alpha" href="/rowers/flexall/drivelength/{{ yparam1 }}/{{ yparam2 }}">Drive Length</a>
|
||||
<a class="button blue small alpha" href="/rowers/flexall/driveenergy/{{ yparam1 }}/{{ yparam2 }}">Work per Stroke</a>
|
||||
<a class="button blue small alpha" href="/rowers/flexall/drivespeed/{{ yparam1 }}/{{ yparam2 }}">Drive Speed</a>
|
||||
@@ -56,6 +57,7 @@
|
||||
<a class="button rosy small" href="/rowers/promembership">SPM (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||
@@ -74,12 +76,14 @@
|
||||
{% if promember %}
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/peakforce/{{ yparam2 }}">Peak Force</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/averageforce/{{ yparam2 }}">Average Force</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/forceratio/{{ yparam2 }}">Average/Peak Force Ratio</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/drivelength/{{ yparam2 }}">Drive Length</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/driveenergy/{{ yparam2 }}">Work per Stroke</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/drivespeed/{{ yparam2 }}">Drive Speed</a>
|
||||
{% else %}
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Avxerage/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||
@@ -97,12 +101,14 @@
|
||||
{% if promember %}
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/peakforce">Peak Force</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/averageforce">Average Force</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/forceratio">Average/Peak Force Ratio</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/drivelength">Drive Length</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/driveenergy">Work per Stroke</a>
|
||||
<a class="button blue small" href="/rowers/flexall/{{ xparam }}/{{ yparam1 }}/drivespeed">Drive Speed</a>
|
||||
{% else %}
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||
@@ -159,4 +165,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/spm/{{ yparam1 }}/{{ yparam2 }}/scatter">SPM</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/peakforce/{{ yparam1 }}/{{ yparam2 }}/scatter">Peak Force</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/averageforce/{{ yparam1 }}/{{ yparam2 }}/scatter">Average Force</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/forceratio/{{ yparam1 }}/{{ yparam2 }}/scatter">Average/Peak force ratio</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/drivelength/{{ yparam1 }}/{{ yparam2 }}/scatter">Drive Length</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/driveenergy/{{ yparam1 }}/{{ yparam2 }}/scatter">Work per Stroke</a>
|
||||
<a class="button blue small alpha" href="/rowers/workout/{{ id }}/flexchart/drivespeed/{{ yparam1 }}/{{ yparam2 }}/scatter">Drive Speed</a>
|
||||
@@ -68,6 +69,7 @@
|
||||
<a class="button rosy small" href="/rowers/promembership">SPM (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||
@@ -86,12 +88,14 @@
|
||||
{% if promember %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/peakforce/{{ yparam2 }}/{{ plottype }}">Peak Force</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/averageforce/{{ yparam2 }}/{{ plottype }}">Average Force</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/forceratio/{{ yparam2 }}/{{ plottype }}">Average/Peak Force Ratio</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/drivelength/{{ yparam2 }}/{{ plottype }}">Drive Length</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/driveenergy/{{ yparam2 }}/{{ plottype }}">Work per Stroke</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/drivespeed/{{ yparam2 }}/{{ plottype }}">Drive Speed</a>
|
||||
{% else %}
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||
@@ -109,12 +113,14 @@
|
||||
{% if promember %}
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/peakforce/{{ plottype }}">Peak Force</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/averageforce/{{ plottype }}">Average Force</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/forceratio/{{ plottype }}">Average/Peak Force Ratio</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/drivelength/{{ plottype }}">Drive Length</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/driveenergy/{{ plottype }}">Work per Stroke</a>
|
||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart/{{ xparam }}/{{ yparam1 }}/drivespeed/{{ plottype }}">Drive Speed</a>
|
||||
{% else %}
|
||||
<a class="button rosy small" href="/rowers/promembership">Peak Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average Force (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Average/Peak Force Ratio (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Length (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Work per Stroke (Pro)</a>
|
||||
<a class="button rosy small" href="/rowers/promembership">Drive Speed (Pro)</a>
|
||||
|
||||
Reference in New Issue
Block a user