From 7c15a2d17a1814849f042f36273b5f5601db0199 Mon Sep 17 00:00:00 2001 From: Tom Goetz Date: Wed, 20 Mar 2024 18:25:39 -0500 Subject: [PATCH] add rhr to monthly dashboard --- Jupyter/graphs.py | 8 +++++++- Jupyter/month.ipynb | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Jupyter/graphs.py b/Jupyter/graphs.py index 909cd2c..a2a2d73 100755 --- a/Jupyter/graphs.py +++ b/Jupyter/graphs.py @@ -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} } @@ -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) diff --git a/Jupyter/month.ipynb b/Jupyter/month.ipynb index 19fee14..ae9019a 100644 --- a/Jupyter/month.ipynb +++ b/Jupyter/month.ipynb @@ -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",