cumstats
This commit is contained in:
@@ -38,35 +38,39 @@
|
||||
</div>
|
||||
|
||||
<div class="grid_6 omega">
|
||||
<h2>Pro</h2>
|
||||
<div class="grid_2 alpha">
|
||||
<p>
|
||||
{% if user.rower.rowerplan == 'pro' %}
|
||||
<a class="button blue small" href="/rowers/histo">Power Histogram</a>
|
||||
{% else %}
|
||||
<a class="button blue small" href="/rowers/promembership">Power Histogram</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
Plot a power histogram of all your strokes over a date range.
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p class="button white small">
|
||||
Pro Feature 2
|
||||
</p>
|
||||
<p>
|
||||
Reserved for future functionality.
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<p class="button white small">
|
||||
Pro Feature 3
|
||||
</p>
|
||||
<p>
|
||||
Reserved for future functionality.
|
||||
</p>
|
||||
</div>
|
||||
<h2>Pro</h2>
|
||||
<div class="grid_2 alpha">
|
||||
<p>
|
||||
{% if user.rower.rowerplan == 'pro' %}
|
||||
<a class="button blue small" href="/rowers/histo">Power Histogram</a>
|
||||
{% else %}
|
||||
<a class="button blue small" href="/rowers/promembership">Power Histogram</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
Plot a power histogram of all your strokes over a date range.
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p>
|
||||
{% if user.rower.rowerplan == 'pro' %}
|
||||
<a class="button blue small" href="/rowers/cumstats">Statistics</a>
|
||||
{% else %}
|
||||
<a class="button blue small" href="/rowers/promembership">Statistics</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
BETA: Statistics of stroke metrics over a date range
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<p class="button white small">
|
||||
Pro Feature 3
|
||||
</p>
|
||||
<p>
|
||||
Reserved for future functionality.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
139
rowers/templates/cumstats.html
Normal file
139
rowers/templates/cumstats.html
Normal file
@@ -0,0 +1,139 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Workout Statistics{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid_12 alpha">
|
||||
<h1>Workout Statistics for</h1>
|
||||
<p>
|
||||
This is an experimental page which just lists a bunch of statistics for
|
||||
your workouts. This page is under rapid development.
|
||||
</p>
|
||||
</div>
|
||||
<div id="summary" class="grid_6 alpha">
|
||||
|
||||
|
||||
|
||||
<p>Summary for {{ theuser.first_name }} {{ theuser.last_name }}
|
||||
between {{ startdate|date }} and {{ enddate|date }}</p>
|
||||
|
||||
<p>Direct link for other Pro users:
|
||||
<a href="/rowers/{{ id }}/cumstats/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}">https://rowsandall.com/rowers/{{ id }}/cumstats/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}</a>
|
||||
</p>
|
||||
<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 id="form" class="grid_6 omega">
|
||||
<p>Use this form to select a different date range:</p>
|
||||
<p>
|
||||
Select start and end date for a date range:
|
||||
<div class="grid_4 alpha">
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<input name='daterange' class="button green" type="submit" value="Submit"> </form>
|
||||
</div>
|
||||
<div class="grid_4 alpha">
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
Or use the last {{ deltaform }} days.
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
{% csrf_token %}
|
||||
<input name='datedelta' class="button green" type="submit" value="Submit">
|
||||
</form>
|
||||
</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 %}
|
||||
@@ -39,6 +39,7 @@
|
||||
<li>SpeedCoach GPS and SpeedCoach GPS 2 CSV export</li>
|
||||
<li>ErgData CSV export</li>
|
||||
<li>ErgStick CSV export</li>
|
||||
<li>BoatCoach CSV export</li>
|
||||
<li>A FIT file with location data (experimental)</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user