118 lines
3.6 KiB
HTML
118 lines
3.6 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 is an experimental page which just lists a bunch of statistics for
|
|
your workout. This page is under rapid development.
|
|
</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 }}/export">Export</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_4 alpha">
|
|
{% if stats %}
|
|
{% for key, value in stats.items %}
|
|
<h2>{{ value.verbosename }}</h2>
|
|
<table width="100%" class="listtable">
|
|
<thead>
|
|
<tr>
|
|
<th>Metric</th>
|
|
<th>Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Mean</td><td>{{ value.mean|floatformat:-2 }}</td>
|
|
</tr><tr>
|
|
<td>Minimum</td><td>{{ value.min|floatformat:-2 }}</td>
|
|
</tr><tr>
|
|
<td>25%</td><td>{{ value.firstq|floatformat:-2 }}</td>
|
|
</tr><tr>
|
|
<td>Median</td><td>{{ value.median|floatformat:-2 }}</td>
|
|
</tr><tr>
|
|
<td>75%</td><td>{{ value.thirdq|floatformat:-2 }}</td>
|
|
</tr><tr>
|
|
<td>Maximum</td><td>{{ value.max|floatformat:-2 }}</td>
|
|
</tr><tr>
|
|
<td>Standard Deviation</td><td>{{ value.std|floatformat:-2 }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
<div class="grid_8 omega">
|
|
{% if cordict %}
|
|
<h2> Correlation table</h2>
|
|
<p>This table indicates a positive (+) or negative (-) correlation between two parameters. The strong correlations are indicated with ++ and --.
|
|
</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">++</div>
|
|
{% elif value > 0.1 %}
|
|
<div class="weakposcor">+</div>
|
|
{% elif value < -0.5 %}
|
|
<div class="negcor">--</div>
|
|
{% elif value < -0.1 %}
|
|
<div class="weaknegcor">-</div>
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% endblock %}
|