About This Dashboard

Row

My Story

TLDR

Since mid February 2019 I’ve been suffering from insomnia. I’ve seen multiple doctors about this, but no one has been able to help me so far. From about the end of July 2019 I’ve started keeping track of my sleep patterns hoping I’d be able to find something actionable there. I’m still collecting this information and hopefully one day this dashboard may prove useful to me.

The Long Version

Until about the age of 27-28, I used to sleep like a child and I felt that nothing can ever disturb my slumber. Since about 28, my sleep has changed but only slightly – I began to regularly get up at 5 am to use the bathroom, but then I would usually get back to bed and have no trouble falling asleep. These toilet trips never bothered me. One morning in mid February, 2019, not long before my 30th birthday, I was unable to get back to sleep after my regular bathroom visit. This went on for a few weeks until one evening I went to bed late at night and to my horror I was wide awake by 3 am. From that point, I began to regularly wake up between 12 and 4 am. My nights usually look like this now:

  • Every night I wake up in the middle of the night
  • The first time I wake up during the night I tend to use the bathroom, having said that I rarely feel like I have a lot in the tank
  • If I wake up to use the bathroom for the first time before 2 am, I usually have no problems getting back to sleep after visiting the bathroom
  • Regardless of whether I had woken up earlier or not, I tend to wake up between 3-4 am for no apparent reason
  • When I wake up between 3-4 am, I tend to stay wide awake for anywhere between 30 mins to 2 hours (sometimes I don’t manage to get back to sleep at all)
  • If I’m wide awake in my bed, I’m usually too tired to do anything (e.g. pick up a book to read) so I tend to stay in bed with my eyes closed
  • If after waking up between 3-4 am I manage to fall asleep, my sleep tends to be of poor quality – either shallow, or I just tend to briefly wake again up every hour or so

When I first realized that I have a nasty case of insomnia that isn’t going to go away by itself, I was genuinely stressed out and I feel that my mental state made this situation worse. However, over the next few months I went through a few periods of recovery one of which lasted for a week and the other a whole 3 weeks. These recovery periods as well as the subsequent relapses did not at all reflect changes in my state of mind and I concluded that the problem must have a physiological explanation which relieved some of the stress I was going through. When I discussed this problem with my doctors, I was referred to a pulmonologist (lung specialist) who gave me some gadgets for me to take a sleep test at home. I did this test during one of those periods of recovery so I didn’t think it would show much, however apparently the test showed that I might have a minor case of sleep apnea and I was referred to take a sleep lab for a more comprehensive analysis. That’s where this dashboard was created.

One one of the 2 nights I spent in the lab was quite poor and I thought that it should give the doctors something to look at. To my astonishment, the doctors concluded that there is nothing physically wrong with me and that in fact my perception of shallow sleep is rather pessimistic. While I thought that I spent a decent chunk of one night in a state of shallow sleep (to elaborate, I felt like I was just lying down with my eyes closed and I could get up at any point), the doctors pointed out that I actually passed out into deep sleep during some of that time though they did concede that I did indeed spent a long time in phase 1 (shallow sleep from a scientific point of view) yet it was not unhealthy from their point of view. And indeed I did feel reasonably well during the day after that night, so I started tracking my daytime energy levels too. I explained to the doctors that most of my nights I either stay awake in the middle of the night for far too long or I just get restless, interrupted sleep and I feel broken during the day. The doctors claimed to have seen cases like mine before and suggested that I should try to ride it out and how that it’ll go away in a year or two.

I’m currently working on Cognitive Behavioural Therapy for insomnia and I’m hoping that it will save me.

Chart Notes

  • Summary
    • Summary Statistics: a high level overview of the key metrics (from my point of view)
  • Night Review
    • Sleep Quality
      • How I Subjectively Rated Each Night: this is how I rated each night. Note that a normal person’s 5/10 rating is probably my 8/10 rating
      • How Much Sleep I’m Getting: This plot attempts to quantify how many hours of sleep I’m actually getting, but do note that these values are very imprecise. I find that sleep ratings are a better representation of sleep quality than pure hours because not every hour of sleep is the same. I also find that getting a long uninterrupted chunk of sleep usually translates into a higher rating. Also note that some period of my sleep are classified as “shallow” – this is when I feel like I’m not fully awake but at the same time I’m not fully out either. Shallow sleep (specifically my definition of it) is a strange phase where I feel like I’m awake, yet I don’t have full control of my thought process and even more strangely, according to sleep tests that I’ve done, I was even going through a deep dream phase at the time I classified as “shallow sleep”
      • Nightly Observations: I also take notes of a few other things such as whether or not I’ve been experiencing palpitations (I tend to get those every now and again), whether I feel a sense of panic (sometimes I can get nervous that I’m going to be a wreck tomorrow) and the state of my nose (I’ve been having trouble with my nose).
    • Nightly Events
      • Each Night Dissected By Hour: This plot attempts to visualize each night by hour and reconstruct each awakening event, each bathroom visit, etc. Whenever I wake up, I would look at the clock and make a mental note of time. In the mornings I record these times in my diary.
    • Efficiency
      • Sleep Efficiency: I believe this metric is often used in clinical studies to determine one’s quality of sleep. The most important thing about it, is that it can be influenced by me to a degree, for sleep restriction for example (as promoted by CBT for Insomnia).
    • Sleep Debt
      • Sleep Debt: In a book I read “Overcoming Insomnia and Sleep Problems”, the author mentioned that every night we get less sleep than we need, we accumulate “sleep debt” and our body will be looking to catch up on the lost sleep the following night. It said that for every 1 hour of lost sleep (sleep below what you need or what you are getting on average) you only need 1/3 of extra hour the following night to recover – this plot attempts to demonstrate these dynamics.
  • Influencing Factors:
    • Alcohol Consumtion: These plots show how much alcohol I consumed daily and over last N days. The values are expressed in terms of standard drinks and are approximate.
  • Analytics:
    • Sleep Rating vs Hours of Sleep: as I suspected, it appears that sleep rating and hours of sleep are not that strongly correlated and this plot shows it
    • Predicting Tomorrow
      • Model Performance: I’ve tried fitting 2 models, 1 for ratings and 1 for hours of sleep, this plot shows how they perform in term of RMSE and correlations between actual and predicted values. For now, these models are terrible as there is just not a lot of data, but hopefully they will improve over time
      • Variable Importance: This plot shows how important each of the variables for each model. The importance scores are relative to the most important variable in each model.

Summary

Night Review

Row

Sleep Quality

Nightly Events

Sleep Debt

CBTi View

Days

Row

Daytime Energy

Condition

Influencing Factors

Analytics

Row

Sleep Rating vs Hours of Sleep

Predicting Tomorrow

Data