Friday, November 1, 2013

Sleep Data - Getting Started

Occasionally, I have trouble sleeping. The most common issue is waking up in the middle of the night, typically around 2am, and having trouble getting back to sleep.

There are lots of variables that could impact my sleep and rather than just guessing, I wanted to start collecting my actual sleep times and other events that could impact sleep. Then I can look for potential causal relationships.

I've been using Tasker on my Android phone to collect sleep data. When I turn the phone face down, it sets that time to a variable. Then when the phone is picked up (and it's been more than 1/2 hour), a dialog asked why I woke up. Then it records the date, time, duration, and reason to a new line in a csv file on the phone. That file is synced once a day to my Google Drive so I can work further with it.

I also have a Tasker dialog that allows me to collect events that could affect sleep such as caffine, stress, nap, etc. That records the date, time, and reason to another csv file.

I've started to learn how to use R, a statistics programming language/environment, to analyze the data but still very early in that process. Specifically, I've been using R Studio.

No comments:

Post a Comment