added spmmin and work filtering to histo
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user