added workstrokesonly fix flex chart datacleaning
This commit is contained in:
1
rowers/.#interactiveplots.py
Normal file
1
rowers/.#interactiveplots.py
Normal file
@@ -0,0 +1 @@
|
||||
E408191@CZ27LT9RCGN72.15972:1488820163
|
||||
@@ -753,11 +753,12 @@ def getrowdata_db(id=0,doclean=False):
|
||||
return data,row
|
||||
|
||||
# Fetch a subset of the data from the DB
|
||||
def getsmallrowdata_db(columns,ids=[],doclean=True):
|
||||
def getsmallrowdata_db(columns,ids=[],doclean=True,workstrokesonly=True):
|
||||
prepmultipledata(ids)
|
||||
data = read_cols_df_sql(ids,columns)
|
||||
if doclean:
|
||||
data = clean_df_stats(data,ignorehr=True)
|
||||
data = clean_df_stats(data,ignorehr=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -1198,7 +1198,8 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
'power','hr','spm','driveenergy',
|
||||
'time','pace','workoutstate']
|
||||
|
||||
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True)
|
||||
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
|
||||
rowdata.dropna(axis=1,how='all',inplace=True)
|
||||
rowdata.dropna(axis=0,how='any',inplace=True)
|
||||
|
||||
@@ -3406,6 +3406,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
yparam1=yparam1,yparam2=yparam2,
|
||||
plottype=plottype,workouttype=workouttype,
|
||||
reststrokes=reststrokes)
|
||||
f.save()
|
||||
|
||||
if request.method == 'POST' and 'workstrokesonly' in request.POST:
|
||||
workstrokesonly = request.POST['workstrokesonly']
|
||||
|
||||
Reference in New Issue
Block a user