Private
Public Access
1
0

charts age decline of 2k power per weight/sex group

This commit is contained in:
Sander Roosendaal
2017-12-12 18:01:06 +01:00
parent 73c03fa54e
commit 228ea8f980
4 changed files with 93 additions and 2 deletions

View File

@@ -1069,6 +1069,37 @@ def interactive_otwcpchart(powerdf,promember=0):
return [script,div,p1,ratio,message]
def interactive_agegroup_plot(df):
age = df['agemin']
power = df['power']
poly_coefficients = np.polyfit(age,power,6)
age2 = np.linspace(11,95)
poly_vals = np.polyval(poly_coefficients,age2)
source = ColumnDataSource(
data = dict(
age = age,
power = power,
age2 = age2,
poly_vals = poly_vals
)
)
plot = Figure(plot_width=900)
plot.circle('age','power',source=source,fill_color='red',size=15,
legend='2k Power')
plot.line(age2,poly_vals)
plot.xaxis.axis_label = "Age"
plot.yaxis.axis_label = "Concept2 2k power"
script,div = components(plot)
return script,div
def interactive_cpchart(rower,thedistances,thesecs,theavpower,
theworkouts,promember=0):