Enabling sleep analysis

#project#data-visualisation

I work for Health Behaviour and Informatics lab at Northeastern University. The lab conducts studies for development of wearable technologies. The goals of these studies varies from changing/developing habits of the participants to testing the feasibility of a particular commercially available wearable or method for health tracking. One of the projects deals with improving sleep habits and understand their relation to stress recovery of the body. The stress is known to affect sleep quality and circadian rhythm. Better sleep patterns may help with stress management as well.

Sleep quality can refer to many variables which include percentage of time in light/deep sleep with respect to total time in bed, time it takes to fall asleep, resting heart rate of the person. Circadian rhythm is a biological process that makes our bodies realise when to eat and when to sleep. When we travel between timezones, our circadian rhythm is disturbed and hence we experience jet-lag.

The sensor (and data collection)

Emfit Quiet sleep sensor was used for this particular study. It is a non-intrusive sensor that goes under the mattress on which a participant sleeps. It is connected to the internet and makes a reading of the heart-rate and respiration-rate every 4 seconds. This data can be accessed using the API, provided by Emfit, after the end of a sleep session. The NUCoach system developed by our lab allows for integration of this sensor and fetches data every few hours. I get this data through the lambda function triggered by NUCoach platform itself. After processing the data, it is stored back on NUCoach database for coaches and participants to access.

The project

Most projects entail having participants who are being coached by a coach based on the data being collected by different sensors. This coaching aims to create a healthy habit in the participant in order to live a healthier lifestyle. For instance, in this particular project, coaching participants to go to bed at the same time everyday can help regulate the circadian rhythm. Their food habits, exercising habits also come into the picture in a larger context but this study focusses, majorly, on sleep. Since participants are the source of the data, we must give them access to the data in order to help them see their progress. My contribution to the project can be classified in 2 parts.
1. Coach side
2. Participant side

Coach side

The coaches are interested in many aspects of the same data. My job was to visualise this data in a consumable way in order to help them to decide on feedback to the participants. The sleep classification data (awake/light/deep sleep) during the sleep session was visualised from beginning to and end.

The timeline is created in a way that each row is a 24 hour period (a day) but the day starts from noon to next noon. One of the advantages of this view is that a coach can visually see that the client did (or did not) got to bed at the same time. The day starts from noon in order to keep all parts of a sleep session together. It is very rare that someone sleeps beyond noon. While keeping the midnight to midnight (left to right) timeline, the session was broken into 2 rows.

The other addition to this view is are the grey histograms on the right. Initially they were planned to be on a different view, which came up once the coach clicked on a sleep session. But I decided to add them on the same view as the landscape view of the web enables that. The 3 columns on the right are histograms for resting heart-rate, sleep efficiency and time it took each night to go to sleep. All this information can display the trends of sleep quality to the coach and help them make decisions on how to intervene with the participant.

Participant side

The participant uses a phone app in which has many other features, but let’s focus on the display of the information for this particular project. The phone space is limited as compared to web (sure, a coach can try to access client’s information on the phone, but the NUCoach platform does not encourage that). Showing a participant their sleep data is done in a scrollable list form, where each session has some details. These details are chosen in a way that when a coach talks to a participant about something that they observed in their own interface, the participant is able to observe that as well. The participant may not able to see the time it took them to sleep, they definitely have to “read” it from the chart or from the text, but if and when a coach points to something they will be able to observe it from their interface as well.