160 lines
5.1 KiB
HTML
160 lines
5.1 KiB
HTML
{% extends "base.html" %}
|
|
{% load staticfiles %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}Workout Statistics{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="grid_12 alpha">
|
|
<h1>Workout Statistics for {{ workout.name }}</h1>
|
|
<p>
|
|
This page lists a bunch of statistics for
|
|
your workout. The mean is of a metric is the mean with equal weight for
|
|
each stroke. The time weighted mean takes into account the stroke
|
|
duration.
|
|
</p>
|
|
<div class="grid_2 alpha">
|
|
<p>
|
|
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/edit">Edit Workout</a>
|
|
</p>
|
|
</div>
|
|
<div class="grid_2">
|
|
<p>
|
|
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/workflow">Workflow View</a>
|
|
</p>
|
|
|
|
</div>
|
|
<div class="grid_2">
|
|
<p>
|
|
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/advanced">Advanced</a>
|
|
</p>
|
|
</div>
|
|
<div class="grid_2 omega suffix_4 tooltip">
|
|
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
|
{% csrf_token %}
|
|
{% if workstrokesonly == True %}
|
|
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="False">
|
|
<input class="grid_2 alpha button blue small" value="Include Rest Strokes" type="Submit">
|
|
{% else %}
|
|
<input class="grid_2 alpha button blue small" type="hidden" name="workstrokesonly" value="True">
|
|
<input class="grid_2 alpha button blue small" value="Remove Rest Strokes" type="Submit">
|
|
{% endif %}
|
|
</form>
|
|
<span class="tooltiptext">If your data source allows, this will show or hide strokes taken during rest intervals.</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid_12">
|
|
{% if otherstats %}
|
|
<div class="grid_6 alpha">
|
|
<h2>Workout Metrics</h2>
|
|
<table width="100%" class="listtable">
|
|
<thead>
|
|
<tr>
|
|
<th>Metric</th>
|
|
<th>Value</th>
|
|
<th>Unit</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key, value in otherstats.items %}
|
|
<tr>
|
|
<td>{{ value.verbose_name }}</td>
|
|
<td>{{ value.value }}</td>
|
|
<td>{{ value.unit }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="grid_6 omega">
|
|
<p>rPower: Equivalent steady state power for the duration of the workout.</p>
|
|
<p>Heart Rate Drift: Comparing heart rate normalized for average power for the first and second half of the workout</p>
|
|
<p>TRIMP: TRaining IMPact. A way to combine duration and heart rate into a single number.</p>
|
|
<p>rScore: Score based on rPower and workout duration to estimate training effect</p>
|
|
<p>rScore (HR): Score based on heart rate, designed to give values comparable to rScore. Used instead of rScore for workouts without power data.</p>
|
|
</div>
|
|
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="grid_12 alpha">
|
|
{% if stats %}
|
|
<h2>Statistics</h2>
|
|
<table width="100%" class="listtable">
|
|
<thead>
|
|
<tr>
|
|
<th>Metric</th>
|
|
<th>Mean</th>
|
|
<th>Time Weighted Mean</th>
|
|
<th>Minimum</th>
|
|
<th>25%</th>
|
|
<th>Median</th>
|
|
<th>75%</th>
|
|
<th>Maximum</th>
|
|
<th>Standard Deviation</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key, value in stats.items %}
|
|
<tr>
|
|
<td>{{ value.verbosename }}</td>
|
|
<td>{{ value.mean|floatformat:-2 }}</td>
|
|
<td> {{ value.wmean|floatformat:-2 }}</td>
|
|
<td>{{ value.min|floatformat:-2 }}</td>
|
|
<td>{{ value.firstq|floatformat:-2 }}</td>
|
|
<td>{{ value.median|floatformat:-2 }}</td>
|
|
<td>{{ value.thirdq|floatformat:-2 }}</td>
|
|
<td>{{ value.max|floatformat:-2 }}</td>
|
|
<td>{{ value.std|floatformat:-2 }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="grid_12 alpha">
|
|
{% if cordict %}
|
|
<h2> Correlation matrix</h2>
|
|
<p>This matrix indicates a positive (+) or negative (-) correlation between two parameters. The Spearman correlation coefficient has values between +1 and -1. Positive correlation between two metrics means that if one metric increases, the other value is also likely to increase. Negative is the opposite. The further from zero, the higher the likelyhood.
|
|
</p>
|
|
<table width="90%" class="cortable">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
{% for key,value in cordict.items %}
|
|
<th class="rotate"><div><span>{{ key }}</span></div></th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key, thedict in cordict.items %}
|
|
<tr>
|
|
<th> {{ key }}</th>
|
|
{% for key2,value in thedict.items %}
|
|
<td>
|
|
{% if value > 0.5 %}
|
|
<div class="poscor">{{ value|floatformat:-1 }}</div>
|
|
{% elif value > 0.1 %}
|
|
<div class="weakposcor">{{ value|floatformat:-1 }}</div>
|
|
{% elif value < -0.5 %}
|
|
<div class="negcor">{{ value|floatformat:-1 }}</div>
|
|
{% elif value < -0.1 %}
|
|
<div class="weaknegcor">{{ value|floatformat:-1 }}</div>
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endif %}
|
|
</div>
|
|
|
|
|
|
{% endblock %}
|