Private
Public Access
1
0

added age records to ote-bests

This commit is contained in:
Sander Roosendaal
2017-12-13 15:37:52 +01:00
parent 098dbb9c4a
commit 451f153983
6 changed files with 431 additions and 13 deletions

View File

@@ -319,12 +319,26 @@ def calc_trimp(df,sex,hrmax,hrmin):
return trimp
def getagegroup2k(age,sex='male',weightcategory='hwt'):
df = pd.DataFrame(
list(
C2WorldClassAgePerformance.objects.filter(
sex=sex,
weightcategory=weightcategory
def getagegrouprecord(age,sex='male',weightcategory='hwt',
distance=2000,duration=None):
if not duration:
df = pd.DataFrame(
list(
C2WorldClassAgePerformance.objects.filter(
distance=distance,
sex=sex,
weightcategory=weightcategory
).values()
)
)
else:
duration=60*int(duration)
df = pd.DataFrame(
list(
C2WorldClassAgePerformance.objects.filter(
duration=duration,
sex=sex,
weightcategory=weightcategory
).values()
)
)