Data

The following graphs depict my sleep data visualisation collected over two weeks.

Link to data set

Introduction

I chose to use chart.js for the creation of my graph, as they had a large selection of graphs to choose from and there was the option to add animations as well. The code was easy to understand and allowed for a lot of customizing. Initially, I had some issues integrating the chart.js code into p5js, as even though they were both javascript, they sort of worked differently and I needed to “embed” the chart.js code into p5js. As Apple's sleep function only had two sets of data - time awake and time asleep, I had to specifically turn off my phone as I was about to head to sleep and turn it on the first thing in the morning for the most accurate results.

Data Visualisation

I used a hover function to allow the user to hover over each of the points to see a piece of data closer, and the animation function to visually demonstrate the state of each type of sleep. For example, since mine was so hectic and mostly below the recommended amount of time, I added a tension animation to the line to demonstrate that. The recommended hours of sleep data is still, as it represents calm. I further included both legends to the top of the chart for further clarity.

Findings

Initially, I did sort of take some notes during this experiment, but I was not sure of how to turn those notes into data that I could include in my graph. Likewise, I have taken note of the variables that I noted down in my initial mindmap, so I think that I could narrow down the stressors too.

I found that on days in which I had mostly sedentary activity, I didn't sleep too well at night - as in I did not meet my determinants for a good night's sleep. On these nights I had a hard time falling asleep and I think I can attribute this to the fact that not much was done throughout the day. Another thing I found was that I was sleeping at an average of ~5 hours per day, which is 3 hours below the recommending timing - this could affect my day to day activities and also cause mental stress and overall fatigue.