added data cleaning to cum flex
This commit is contained in:
@@ -168,6 +168,13 @@ def clean_df_stats(datadf,workstrokesonly=True,ignorehr=True,
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
mask = datadf['wash'] < 1
|
||||
datadf.loc[mask,'wash'] = np.nan
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
if not ignoreadvanced:
|
||||
try:
|
||||
mask = datadf['rhythm'] < 5
|
||||
|
||||
@@ -895,7 +895,7 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
# datadf = dataprep.smalldataprep(theworkouts,xparam,yparam1,yparam2)
|
||||
ids = [int(w.id) for w in theworkouts]
|
||||
columns = [xparam,yparam1,yparam2,'spm','driveenergy','distance']
|
||||
datadf = dataprep.getsmallrowdata_db(columns,ids=ids,doclean=False,
|
||||
datadf = dataprep.getsmallrowdata_db(columns,ids=ids,doclean=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
|
||||
try:
|
||||
@@ -981,7 +981,7 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
y2means = y1means
|
||||
|
||||
xlabel = Label(x=100,y=130,x_units='screen',y_units='screen',
|
||||
text=xparam+": {x1mean:6.2f}".format(x1mean=x1mean),
|
||||
text=axlabels[xparam]+": {x1mean:6.2f}".format(x1mean=x1mean),
|
||||
background_fill_alpha=.7,
|
||||
background_fill_color='white',
|
||||
text_color='green',
|
||||
@@ -994,7 +994,7 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
plot.add_layout(y1means)
|
||||
|
||||
y1label = Label(x=100,y=100,x_units='screen',y_units='screen',
|
||||
text=yparam1+": {y1mean:6.2f}".format(y1mean=y1mean),
|
||||
text=axlabels[yparam1]+": {y1mean:6.2f}".format(y1mean=y1mean),
|
||||
background_fill_alpha=.7,
|
||||
background_fill_color='white',
|
||||
text_color='blue',
|
||||
|
||||
Reference in New Issue
Block a user