Create 24 hours line graph of my heart rate? (measured with Apple Watch)

How can I create a nice 24 hours line graph of my heart rate?

I already bought Health Exporter to export my data (measured with Apple Watch) in CSV format:

This works fine, but I forgot that the interval between measurements is variable…

If I don’t compensate for this two parts that have equal width on the X-axis might cover a total different timespan (one might cover 1 hour with 6 measurements in that hour, while the other might cover 1 minute with 6 measurements from a workout).

How do I cope with this in Numbers or Excel?

Or is there an App that does this well? (And works offline)

I’m not sure how to properly describe this, but what I basically want is a line graph with 24 “columns” (tick marks on the X-axis) where each column represents 1 hour and where the number of datapoints within that column depends on the number of measurements from the Apple Watch during that hour.

You need to make an X-Y chart. With two columns in your table, one for the date and the second for the heart rate, select them both and make a scatter plot. Unfortunately, I can’t get this to work in Pages, there seems to be a bug. It does work with LibreOffice and I would assume Excel.

Ah, yes, I was already thinking I might need something like that. Thanks!

Do you know whether the time has to be in a certain format for this to work?

(Do I for example need to convert them to seconds since the Epoch?)

When I import the CSV into Numbers, the date columns are in text format. I have to select the cells and change the format to “Date and Time”. However when I try to make the chart I can’t have the X axis be the date and the Y axis be the heart rate. Numbers insists they be the same column and if I change one the other changes automatically as well! So I went to LibreOffice. Imported changing the column type to Date (DMY) to match the CSV file.

However, even when I exported it in Excel format, Numbers couldn’t handle the dates! So my suggestion is to use LibreOffice/OpenOffice/Excel for this.

1 Like

Could not get it to work in Numbers either, but Excel seems to work. Thanks!

One more detail I had trouble with: I’m not displaying data from 00:00 till 23:59, but from 19:00-07:00. Excel does not understand that the second part is the next day. It now draws the evening at the right side of the graph and the next morning on the left side…

That’s probably because I stripped the date to be just HH:MM, because the original format is ISO 8601, which Excel did not seem to understand.

Luckily I found this: https://www.smartftp.com/support/kb/2684

I now have the graph I want/need! :smiley:

Interesting. Seems to be the case where LibreOffice does better than what it’s trying to mimic (Excel) since it had no problem with the date/time format.