oura-hrv-activity-sleep.ipynb
A notebook adapted from Herman de Vries' blogpost and code on using Oura data to explore the links between HRV, physical activity and sleep
Please log in to comment.from data from oura ring 2022 on like 7th or 8th cell: Error in runSum(x, n): n = 7 is outside valid range: [1, 6] Traceback: 1. df %>% rename
This notebook is based on the work by Herman de Vries, which he published in a very interesting blog post. Herman also presented his work at one of the Open Humans self-research chats. Following the chat Herman was so kind to publish the code he used for analyzing his Oura data as an HTML render of his R code.
If you want to learn more about what Herman learned and how he approached his learning from his Oura data you should definitely read his blog post, as this code is not fully annotated yet.
I took Herman's code and copy & pasted most of it right into the Exploratory framework of Open Humans. I only made minor changes to the preamble of the notebook in which the data is being loaded. Herman used a CSV export from Oura, while this notebook makes use of the JSON file of your historic data that's stored in Open Humans.
What this means: If you want to run this notebook right away on your own Oura data you have to import it into Open Humans by going to https://oura.openhumans.org/. Once your data is stored in Open Humans the notebook should run from start to finish without any issues.
Below is the boring code that loads your personal Oura data and puts it into a format that's in line with Herman's original code. If you're not interested in such things you can straight jump to the next headline.