Private
Public Access
1
0

added spmmin and work filtering to histo

This commit is contained in:
Sander Roosendaal
2019-04-29 19:54:08 +02:00
parent 991612d02b
commit a670ee0884
4 changed files with 32 additions and 13 deletions

View File

@@ -1214,7 +1214,9 @@ def fitnessmetric_chart(fitnessmetrics,user,workoutmode='rower',startdate=None,
return [script,div]
def interactive_histoall(theworkouts,histoparam,includereststrokes):
def interactive_histoall(theworkouts,histoparam,includereststrokes,
spmmin=0,spmmax=55,
workmin=0,workmax=1500):
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,crosshair'
ids = [int(w.id) for w in theworkouts]
@@ -1224,6 +1226,12 @@ def interactive_histoall(theworkouts,histoparam,includereststrokes):
rowdata.dropna(axis=0,how='any',inplace=True)
rowdata = dataprep.filter_df(rowdata,'spm',spmmin,largerthan=True)
rowdata = dataprep.filter_df(rowdata,'spm',spmmax,largerthan=False)
rowdata = dataprep.filter_df(rowdata,'driveenergy',workmin,largerthan=True)
rowdata = dataprep.filter_df(rowdata,'driveenergy',workmax,largerthan=False)
if rowdata.empty:
return "","No Valid Data Available"