Reverse Engineering a Time Series Sleep Cycle Plot from Oura Ring

Cole Hagen
4 min readFeb 27, 2023

Step by step guide to reconstruct a data visualization with python and plotly

Plot generated by the author using plotly

Introduction

The aim of this article is to identify an interesting data visualization and learn how to reconstruct it as an interactive plot with python. As a researcher in wearable technology, I find the health and behaviroal trends captured by Oura Ring facinating. Therefore, I will take you step-by-step as I work to reverse engineer a plot from their LinkedIn page (see below).

Plot by Oura Available on LinkedIn: https://www.linkedin.com/company/oura/posts/?feedView=all

The replication won’t be perfect, but it’s a great exercise to work on python skills and utilize the great tools available with plotly.

Import libraries

Plotly, pandas, and numpy are three python libraries used in this tutorial. You can learn more about each library by clicking on the links below:

Let’s start coding.

--

--

Cole Hagen

Interests in Python, Machine Learning, and Wearable Sensors | PhD Student Neuromotor Science