↑ Return to Help and How to

Analyze Data


Lucid dreaming app revolves around two processes: collect data and analyze data. To help facilitate analysis, the tool automatically plots the data for you. Here’s an explanation on how to work with the graph viewer activity.






Basic sleep graph

Axis and series

  • Sleep score – Values less than 1 indicate sleep, otherwise awake. This is the red line
  • Sleep episodes – value of 0 indicates awake, 10 falling asleep and 20 asleep. This is the blue line
  • Sleep duration rises with each minute you are asleep. This may be useful for estimating periods of sleep interruption. Green line
  • Reminder played – shows the minute when a reminder was played. This info may be helpful in gauging the effectiveness of the app. Purple X above the blue line
  • Awake, Dream, Lucid Dream, User Event – indicates minutes when the you interacted with the screen. These are shown as little symbols in the upper portion of the graph

Symbols are color coded and shown in the legend. Here’s what they stand for:

  • X = reminder played that minute.
  • O stands for both awake and no dream events
  • Triangle stands for regular dreams
  • Square stands for lucid dreams
  • Diamond stands for other events and screen interactions

Sleep Statistics

Graphs include a statistical summary of that night’s sleep. Here’s the overview of some important metrics:

  • Sleep onset latency – time it takes to reach 5 consecutive minutes of sleep
  • Sleep score – a user is considered asleep if the sleep score is less than 1 on 5 consecutive minutes
  • Number of awakenings – number of times the app detected significant movement and think you were awake
  • Number of user events – number of minutes when you interacted with the screen (max 1/minute)
  • Longest sleep episode – longest period with sleep score of less than 1

Analyzing the data

Lucid Dreaming App produces a lot of data, and there’s quite a lot that may be learned. There are 2 modes of analysis: individual graph and History.

To view individual graphs, open the app to see two androids in a dream bubble. Press the menu key on your phone to open the menu bar. From the menu bar, select “View Data”>”Load Graph”.

Lucid Dreaming App typical night's data.

Above is what the typical night of data may look like. So you got fancy graphs… Now what? First thing you should look at is the duration of your sleep episodes. These are shown as the raised blue line. The line is raised for each minute you were in deep, motionless sleep.

As you might’ve guessed, the blue and green line show the same data just in different formats. The green line shows total minutes asleep and raises as you accumulate more sleep. By analyzing the green line, I may see:

  • When I fell asleep (~2:30 AM) – this is when the line starts rising
  • Identify periods of restless sleep – this is when the line is flat (~7:00-7:30 AM)
  • Find out the total sleep duration (Y axis) vs Time (X Axis) (200 min at 6:40, up to 290 min at 7:20)

By itself, the green line does not tell us much, unless we look at the history of data. (I’m getting ahead of myself here, but here’s a comparison of the night above with an night that I had earlier in the week:

An insomnia night vs regular night

By recording sleep data every night, you will be able to compare your sleep graphs over 1 week period. This will help you determine the best time to go to bed, as well as validate any pre-bed rituals that you might do: for example comparing quiet meditation (before blue line) to watching exciting online podcasts (red line).


XYZ Activity and the Sleep Score

When your phone is placed on your bed and the Lucid Dreaming App is running, it automatically collects and filters accelerometer sensor data. Based on this, it produces an activity level very close to 0 when the app is laying flat, while registering activity spikes produced by movement and mattress shaking:

Sleep score is calculated from filtered activity data

The Android Lucid Dreaming App uses Actigraphy data to automatically score sleep, according to Cole sleep scoring algorithm. The algorithm looks at a the activity data for the past 4 minutes, the current minute and the following 2 minutes to score sleep.

Score below one indicates sleep, score above 1 indicates waking state. Sleep score rises in proportion to the movement.

To better view activity and sleep score for your phone, you may change the Y Axis resolution for both sleep score and activity level. To do so: press menu button > preferences>scroll down to display options> scroll down to sleep score Y Max and Activity count Y Max. Set desired values and reload the graph.

Changing the Y Max allows you to either clip data that is too high or zoom in on the data you really want to see

Notice that changing the Y Max for Activity count from 2500 to 1000 makes it a lot more visible on small screen! I also changed the sleep score from 35 to 15.

Analyzing sleep score and activity level allows to determine the following:

  • Activity level above a certain threshold (2000 for my mattress) indicates getting out of bed
  • Activity level of ~500 means writing in a dream journal or getting a drink of water, or rolling over in bed
  • Sustained activity level (like from 7:00 to 7:30 may indicate restless sleep) Use “After movement” Smart Timer event to deliver reminders during such episodes, as they may indicate very light sleep.
  • A jittery sleep score graph means you need to calibrate your accelerometer or restart the phone before running the app
  • A jittery activity graph means your accelerometer works in a way that I did not anticipate 🙁 (I have only 1 of over 370 Android phones out there!)

Analyzing User Events

Android Lucid Dreaming App uses the phone’s touch screen to capture user events in form of on screen gestures. Gestures are drawn by touching the screen and dragging the finger, drawing a desired shape with the yellow line that follows your finger.

Main gesture types:

  • Normal Dream – triangle
  • Lucid Dream – square
  • Awake – circle
  • No Dream – circle
  • User Event (any gesture that you define) – diamond
  • WILD Timer – not shown
  • Math – not shown

Of particular interest are the normal dream gestures, especially if entered immediately after waking up from a dream. They indicate that an REM episode was experienced right before the awakening.

User events reflected on the graph. Triangles are dreams, Xs are reminders, Diamonds are misc events

On the graph above, we can see that 4 reminders have been delivered by the app that night. They correspond to the Smart Timer events that I’ve created. 3 Dreams were reported (barely visible yellow markers) at 5:30AM, 7:30 AM and 9:10 AM. We can see that one reminder – at 5:25 occured before the dream was reported. This is a good indication that the reminder might’ve been integrated into the dream’s content, or that it caused an awakening from a dream.

Entering dreams over time is very important, as it allows you to analyze them using History feature later:

5 day dream events from the sample history file included with the appNotice how triangles (dreams) over 5 days cluster around specific times (all times are measured from time in bed). You may configure smart timer to deliver reminders around those times.

[Add history analysis section]


Audio Level Analysis

An experimental feature that is coming in V0.7.1 is audio level analysis. No sound is recorded and stored, but rather short audio recordings are being continuously analyzed and discarded. By continuously sampling data in 1 second intervals at 8Khz, it is possible to determine the sound intensity which takes place during sleep:

Audio level Kurtosis (peakedness) - blue line and motion activity (yellow line)

High Kurtosis indicates that a data set has a few rare, high outlying values.

If we examine the data above, we notice that audio level indeed has high values around periods of activity (ex: bed squeaking, covers rustling), but there are additional activity immediately before the dream is reported. This may mean talking in sleep, grunting, snoring or other voice related cues which are not intense enough to be reflected on the motion chart. On the other hand, these can also be sounds coming from the outside.

Audio level display will likely change in the future. I envision it being useful for:

  • Noise analysis versus sleep quality. Notice how noise picks up at around 5:20 Am as the highway outside starts to pick up traffic.
  • Voice cues analysis – snoring, speaking, etc
  • Disturbance analysis – another person was in the kitchen from 6:40 to 7:20AM, preparing for work.
  • Potentially delivering reminders on sound during REM episodes


Section on working with history is coming soon!