You Canât Fix What You Donât Measure
A UI/UX and data visualisation deep-dive into what my own sleep data reveals â and what it took to finally see it clearly.
I have a terrible sleep cycle. Not âI stayed up a bit lateâ sleep cycle. I mean chronically, chaotically, unpredictably terrible sleep cycle.
But Iâm a data science student. So instead of googling âhow to fix sleepâ for the hundredth time, I pulled my actual sleep data, built some visualisations, and sat with what the numbers were really saying.
What follows is a design walkthrough of the data visualisation. This dashboard isnât just a tool, itâs a mirror of my poor sleep habits.
The Design Philosophy: Making the Invisible Legible
Before we get into the habits, a word on the visualisation choices.
Sleep data is chronologically dense, multi-dimensional, and deeply personal. The wrong chart type either flattens it into something meaningless or overwhelms with noise. Each of the three visualisations here was built to answer a specific question:
- The Sleep Quality Heatmap â How has my sleep quality trended over time?
- The Recovery Heatmap â What does my bodyâs physiological response to sleep look like?
- The Bedtime/Wake-Up Sankey â What patterns exist between when I fall asleep and when I wake up?
The consistent dark theme isnât just aesthetic, sleep is nocturnal and hence the UI should feel like it. The colour language is intended to be intuitive: blue/purple for optimal, orange for excess, red for insufficient. Users read the emotional register of colour before they read the legend.
Now letâs look at what the data actually shows.
Habit #1: Iâm Sleeping the Wrong Amount â And Swinging Between Extremes
The first and most obvious problem isnât just that I sleep too little. Itâs the volatility.

Look at the Sankey diagram. The right-hand column â wake-up times â fans out from 04:00 all the way down to 18:00. Thatâs a 13-hour spread in when my body is expected to start the day. Orange (excessive sleep) and blue (optimal) sit side by side across the weeks, with occasional flashes of red (insufficient) dotting the mix.
This is not a short-sleep problem. This is a regulation problem.
When you oscillate between 5 hours and 11 hours, your body never builds a reliable expectation of either. Sleep pressure (the homeostatic drive that makes you tired) gets thrown off. Melatonin release becomes unpredictable. Youâre essentially resetting your circadian clock every few days â which is the metabolic equivalent of flying Melbourne to London, recovering, then flying back, repeatedly, forever.
The fix isnât just âsleep more.â Itâs âsleep consistently.â
Habit #2: The Missing Anchor
If the Sankey shows the chaotic destination (wake time), the Sleep Quality Heatmap reveals the lack of a stable origin.

From a dataviz perspective, this is where the indent/bulge encoding in the Sleep Quality Heatmap earns its keep. Squares that âindentâ to highlight under-sleep and squares that âpopâ to highlight over-sleep.
A consistent bedtime is a prior your body learns. Without it, your circadian rhythm is trying to predict sunrise with no reference point. Every system that depends on that rhythm⌠cortisol, melatonin, core body temperature is flying blind. The visualization makes the solution obvious: I donât need to sleep more; I need to find an anchor.
Habit #3: Quantity vs. Quality (The âHollowâ Sleep)
The instability shown in the previous charts leads directly to a deeper issue: I was spending plenty of time in bed, but my Sleep Quality Ratio was chronically low.

In the first iteration of the dashboard, my overall average quality sat at just 34% (a raw ratio, not normalized to a traditional 0â100 scale). To understand why thatâs a problem, you have to look at the formula:
The Formula: (REM + Deep) / Total Sleep Time
Sleep isnât a monolithic state; itâs a tiered architecture of recovery:
- Deep Sleep: where physical repair happens (tissue growth, immune function, and growth hormone release).
- REM Sleep: where cognitive restructuring happens (memory consolidation, emotional processing, and creative problem solving).
- Core Sleep: where âhave a breakâ happens.
The visualization makes this imbalance impossible to ignore. In the color-coded bar of the Overall Average section, the slivers of blue (Deep) and purple (REM) are completely dwarfed by the pink (Core).
Most people assume that more total sleep automatically equals more restoration. It doesnât. You can sleep for ten hours and still wake up biologically exhausted if your ratio is off. The data showed that I wasnât just sleeping poorly, I was sleeping âhollow.â The composition is what actually drives recovery.
Habit #4: Iâm Using Oversleeping as Compensation
The Sankey diagram has a particular cluster thatâs hard to ignore: long flows connecting early-morning bedtimes (01:00â04:00) to very late wake-up times (12:00â15:00). These are the ârecovery daysâ after particularly bad nights where Iâm trying to claw back sleep debt with sheer volume.
This feels like recovery. The data says otherwise.
Sleep debt isnât a bank account. You canât deposit 11 hours on Sunday and withdraw it evenly across the week. What oversleeping actually does is delay your sleep onset the following night (because sleep pressure hasnât had time to rebuild), which pushes your bedtime later, which shortens the next nightâs sleep, which triggers another oversleeping compensation and the cycle continues.

This feels like recovery, but the Recovery Heatmap tells a different story. While my Recovery Effectiveness (1.63x) shows my body can recover well, oversleeping actually pushes the next nightâs bedtime even later.
The data reveals a vicious cycle: a bad night leads to an oversleeping âfix,â which destroys sleep pressure for the following night, which triggers another late bedtime. The visualization stops me from lying to myself about âcatching upâ on sleep.
What the Data Actually Recommends
Hereâs where it gets interesting and validating in an uncomfortable way.
The Sankey diagram shows a Golden Routine: highlighted in the legend as the most frequent routine where I experience optimal sleep.
Bedtime: 02:00 â 03:00 â Wake up: 08:00 â 09:00
This isnât a routine I invented; itâs what my own data says Iâm already good at. The nights where I honour this 2am-3am window produce the strongest recovery metrics and the best HRV ratios.
The nights where I go to bed between 2 and 3am and wake between 8 and 9am are the nights that produce the best quality scores, the strongest recovery metrics, and the most consistent HRV ratios.
Statistically, if I want to fix my sleep, I donât need to become a 6am person. I need to honour the rhythm my body has already demonstrated. The data isnât asking me to be someone different. Itâs asking me to be more consistent about who I already am.
Closing Thoughts: Data as Accountability Partner
Thereâs something uniquely confronting about seeing your own bad habits rendered in a well-designed chart.
A wall of raw numbers is easy to dismiss. But a heatmap where the chaos is visually undeniable, or a Sankey where inconsistency fans out across 13 hours, those are harder to look away from. Thatâs the real power of personal data visualisation. It doesnât just inform; it implicates.
Now I can see it. The 2am bedtime isnât the problemâthe inconsistency around it is. The fix isnât willpower. Itâs just showing up for the routine my own data has already proven works.
Built using personal sleep tracking data. Visualisations designed to surface actionable patterns in sleep quality, duration and recovery metrics.
until next time !ď¸ â
or you could spot me in the wild đ¤ i mean instagram, twitter, linkedin and maybe even youtube where i may make video versions of these blog posts