Skip to content

Commit

Permalink
add rhr to monthly dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
tcgoetz committed Mar 20, 2024
1 parent c6742e1 commit 7c15a2d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Jupyter/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
'size' : [8.0, 6.0],
'steps' : {'period' : 'weeks', 'days' : 730},
'hr' : {'period' : 'weeks', 'days' : 730},
'rhr' : {'period' : 'weeks', 'days' : 730},
'itime' : {'period' : 'weeks', 'days' : 730},
'weight' : {'period' : 'weeks', 'days' : 730}
}
Expand Down Expand Up @@ -197,8 +198,13 @@ def _graph_itime(self, time, data, period, geometry=111):
self.__graph_multiple(time, [itime, itime_goal_percent], 'Intensity Minutes', period, ['Intensity Minutes', 'Intensity Minutes Goal Percent'],
yrange_list, self.save, geometry)

def _graph_rhr(self, time, data, period, geometry=111):
"""Generate a rhr graph"""
weight = [entry.rhr_avg for entry in data]
self._graph_multiple_single_axes(time, [weight], 'Resting Heart Rate', 'rhr', self.save, geometry)

def _graph_weight(self, time, data, period, geometry=111):
"""Generate a graph weight"""
"""Generate a weight graph"""
weight = [entry.weight_avg for entry in data]
self._graph_multiple_single_axes(time, [weight], 'Weight', 'weight', self.save, geometry)

Expand Down
3 changes: 3 additions & 0 deletions Jupyter/month.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
"\n",
"graph = Graph()\n",
"\n",
"graph.graph_activity('rhr', 'days', num_of_days)\n",
"\n",
"\n",
"graph.graph_activity('weight', 'days', num_of_days)\n",
"\n",
"days = [datetime.date.today() - datetime.timedelta(days=day) for day in range(num_of_days)]\n",
Expand Down

0 comments on commit 7c15a2d

Please sign in to comment.