-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interpreting apple watch timestamps #6
Comments
@francescolosterzo If you check the apple_health_data_processor.ipynb, you'll see this line:
There is where we set the tz and then subsequent lines parse it to correct timezones. Check that to see if it works for your needs. To be honest, that code is one of the older parts so I'm not sure if it's up to data to any changes Apple made in their export files and timestamps. |
@markwk I am continuing this since now I see other things I would like to ask you and they still fall under the title of this issue.
|
@francescolosterzo you didn't share your code so I'm only guessing but it sounds like you didn't convert it to datetime or process it like the other examples. I went ahead and added a quick example in code showing and plotting HR now in that notebook. Still a small issue with x-axis labeling or ticks but you shouuld have the idea now. |
Hi @markwk
This might cause problems on the days in which I actually changed timezone, but this is not the problem right now. The real problem I was referring to is that if I chart the HR vs timestamp in a single night, I get points flipped in time every now and then. Here is an example:
As you can see above the 3rd and the 4th entries are flipped in time. This happens a few times in each night. So I was wondering if you have any idea about why this happens? |
@francescolosterzo Sorry. I haven't seen this error in my data and not sure why it's appearing for you. You should be able to do a new sort on the data to correct it without any issues. |
Hi!
I am using this awesome work to look at my health data, and I have a question about how to interpret the timestamps/datetimes.
If I open the
csv
file I am interested in see that thecreationDate
of the first row is2017-01-28 10:20:52 +0200
, while if I read the file withpandas.read_csv(...)
using theparse_dates
argument, I get the corresponding value to be2017-01-28 08:20:52
.In the blog post it says that the data contain UTC timestamps and that's ok, my problem is more about the timezone info: During this summer I spent the August in the US (I live in Europe), but I don't see this reflected in the data: here is what the
creationDate
of a row on August 8th looks like:2019-08-08 02:03:20 +0200
.Shall I assume that the timestamp (i.e. the pure date & time, discarding the timezone info) is still UTC and then I have to figure out the daily time zone by myself? Or what else?
The text was updated successfully, but these errors were encountered: