Details for dashboard-oura-spotify.ipynb

Published by gedankenstuecke

Description

This notebook is an attempt at making an interactive dashboard to correlate many of the different variables tracked by either the Oura Ring or Spotify through the use of the plotly library along with interactive widges for Jupyter notebooks.

Ironically, this dashboard currently doesn't work well in the voila dashboard view, which means you should select Edit & Run in the Exploratory to render it in the regular Jupyter interface! Select Cell and then Run All from the menu in the Jupyter interface (This is because the plotly library is currently not installed by default and takes a while to install).

0

Tags & Data Sources

plotly dashboard interactive Oura Connect Spotify integration

Comments

Please log in to comment.

Notebook
Last updated 1 year, 4 months ago

Interactive Dashboards for Spotify and Oura Ring Data

If you want to run this notebook and run into problems or have questions: Reach out to Bastian on Twitter or Slack

This notebook is an attempt at making an interactive dashboard to correlate many of the different variables tracked by either the Oura Ring or Spotify through the use of the plotly library along with interactive widges for Jupyter notebooks.

Ironically, this dashboard currently doesn't work well in the voila dashboard view, which means you should select Edit & Run in the Exploratory to render it in the regular Jupyter interface! Select Cell and then Run All from the menu in the Jupyter interface (This is because the plotly library is currently not installed by default and takes a while to install).

For this notebook to work you should have at least one of those two data sources connected to your Open Humans account:

With that out of the way, we'll get started to load the libraries and data and process it. Feel free to skip to the very end of the notebook to see the plots!

Oura Ring data exploration

Now we're getting to the first interactive plot. Below is the visualization and settings for the Oura data. You can select which data should be shown on the X & Y axis, along with the visualizations for the data distribution that you want to be shown on the margins. You can also opt in to see a linear or local fitting of the data, depending on your preference (this works only for numeric data, not for dates yet).

You can hover over each data point, the marginal plots etc and also zoom in/out for your regions of interest.

Visualizing the Spotify data!

Now we're getting to the second interactive plot. Below is the visualization and settings for the Spotify data. You can select which data should be shown on the X & Y axis, along with the visualizations for the data distribution that you want to be shown on the margins. You can also opt in to see a linear or local fitting of the data, depending on your preference (this works only for numeric data, not for dates yet).

You can hover over each data point, the marginal plots etc and also zoom in/out for your regions of interest.

Out[10]:
{'summary_date': '2022-11-26',
 'timezone': 0,
 'day_start': '2022-11-26T04:00:00+00:00',
 'day_end': '2022-11-27T03:59:59Z',
 'cal_active': 22,
 'cal_total': 1723,
 'class_5min': '11111111111111111111111111111111111111111111111111111111111111111111111123333',
 'steps': 524,
 'daily_movement': 506,
 'non_wear': 0,
 'rest': 367,
 'inactive': 5,
 'low': 12,
 'medium': 1,
 'high': 0,
 'inactivity_alerts': 0,
 'average_met': 1,
 'met_1min': [1.7,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  1.1,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.4,
  0.9,
  0.9,
  1.0,
  1.2,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  1.0,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  1.0,
  0.9,
  0.9,
  0.9,
  1.1,
  1.0,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  1.2,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.0,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  1.0,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  0.9,
  1.3,
  1.8,
  2.3,
  1.2,
  1.2,
  1.2,
  1.6,
  1.4,
  2.7,
  3.5,
  1.4,
  2.9,
  3.1,
  2.9,
  3.3,
  3.8,
  3.8,
  4.6,
  2.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  ...],
 'met_min_inactive': 0,
 'met_min_low': 16,
 'met_min_medium': 3,
 'met_min_high': 0,
 'target_calories': 450,
 'target_km': 9.0,
 'target_miles': 5.592339,
 'to_target_km': 8.7,
 'to_target_miles': 5.4059276999999994,
 'score': 95,
 'score_meet_daily_targets': 100,
 'score_move_every_hour': 100,
 'score_recovery_time': 100,
 'score_stay_active': 71,
 'score_training_frequency': 100,
 'score_training_volume': 99,
 'rest_mode_state': 0,
 'total': 13}

Have fun exploring your data, and join #self-research in the OH Slack if you found something interesting you want to share!

Out[9]:
{'summary_date': '2018-11-06',
 'timezone': -480,
 'day_start': '2018-11-06T04:00:00-08:00',
 'day_end': '2018-11-07T03:59:59-08:00',
 'cal_active': 375,
 'cal_total': 2531,
 'class_5min': '0000000000000000000000000000000000000000000000000000000000000322222232322222222321234432222112344423422323222322232322332222223233332222233322323444433444322223222323222233322323322323332222222232222222221222222222222222222211122111221111111111111111111111111111111111111111111111111',
 'steps': 9082,
 'daily_movement': 6197,
 'non_wear': 308,
 'rest': 410,
 'inactive': 465,
 'low': 199,
 'medium': 58,
 'high': 0,
 'inactivity_alerts': 1,
 'average_met': 1.34375,
 'met_1min': [0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  2.8,
  2.9,
  1.6,
  1.3,
  1.8,
  1.5,
  1.6,
  1.4,
  1.2,
  1.5,
  1.3,
  1.3,
  1.3,
  1.1,
  1.2,
  1.2,
  1.6,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.3,
  1.4,
  1.2,
  1.3,
  1.3,
  1.6,
  1.9,
  2.3,
  1.7,
  1.6,
  1.9,
  2.2,
  1.7,
  1.5,
  1.7,
  1.9,
  1.5,
  1.4,
  1.9,
  1.8,
  1.8,
  1.5,
  1.5,
  1.5,
  1.4,
  1.5,
  1.3,
  1.9,
  1.7,
  1.6,
  1.6,
  1.4,
  1.2,
  1.2,
  1.3,
  1.2,
  1.3,
  1.2,
  1.2,
  1.1,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.1,
  1.0,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.5,
  1.6,
  1.4,
  1.3,
  1.2,
  1.3,
  1.3,
  1.5,
  1.2,
  1.3,
  1.5,
  1.9,
  2.4,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.9,
  1.7,
  2.1,
  4.2,
  2.4,
  3.9,
  7.1,
  4.7,
  5.5,
  4.4,
  4.8,
  5.3,
  5.2,
  2.6,
  4.6,
  2.5,
  1.3,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.5,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.1,
  1.0,
  1.0,
  1.0,
  1.1,
  1.0,
  1.2,
  1.1,
  0.9,
  0.9,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  1.3,
  1.8,
  1.5,
  1.3,
  2.0,
  3.3,
  2.1,
  5.6,
  5.2,
  2.1,
  5.2,
  3.7,
  4.8,
  5.5,
  5.3,
  3.4,
  5.1,
  5.8,
  5.2,
  5.3,
  4.6,
  2.5,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  2.4,
  5.1,
  5.1,
  1.9,
  3.7,
  5.2,
  3.5,
  1.7,
  1.4,
  1.3,
  1.7,
  1.3,
  1.4,
  1.6,
  1.3,
  1.3,
  1.3,
  2.0,
  1.3,
  1.8,
  1.2,
  1.5,
  2.1,
  1.2,
  1.4,
  1.6,
  1.9,
  1.3,
  1.8,
  2.7,
  1.7,
  1.6,
  1.9,
  1.5,
  1.1,
  1.3,
  1.2,
  1.4,
  1.7,
  1.8,
  1.4,
  1.3,
  1.7,
  1.9,
  1.5,
  1.6,
  1.5,
  1.4,
  2.3,
  1.8,
  2.3,
  1.3,
  1.1,
  1.3,
  1.2,
  1.2,
  1.2,
  1.1,
  1.2,
  1.2,
  1.9,
  1.6,
  1.3,
  1.4,
  1.4,
  1.2,
  1.2,
  2.2,
  1.8,
  1.3,
  1.2,
  1.2,
  1.3,
  1.4,
  1.3,
  1.3,
  1.8,
  1.7,
  1.5,
  1.8,
  1.5,
  1.3,
  1.6,
  1.6,
  1.5,
  1.7,
  1.6,
  1.4,
  1.5,
  1.7,
  1.6,
  1.5,
  1.7,
  3.5,
  1.7,
  1.6,
  1.9,
  1.9,
  1.4,
  1.5,
  1.7,
  1.3,
  1.2,
  1.5,
  1.6,
  3.1,
  1.8,
  1.4,
  1.3,
  1.4,
  1.3,
  1.3,
  1.5,
  1.2,
  1.3,
  1.5,
  1.7,
  1.5,
  1.4,
  1.5,
  1.4,
  1.4,
  1.3,
  1.4,
  1.6,
  1.5,
  1.4,
  1.4,
  1.3,
  1.4,
  1.7,
  1.9,
  1.7,
  1.9,
  1.7,
  1.6,
  1.6,
  1.6,
  1.8,
  1.7,
  1.7,
  1.8,
  1.4,
  1.9,
  1.9,
  1.9,
  1.7,
  1.6,
  1.8,
  1.9,
  1.7,
  2.1,
  1.9,
  1.7,
  1.8,
  1.9,
  1.8,
  1.9,
  1.8,
  1.6,
  1.7,
  1.5,
  1.5,
  1.5,
  1.7,
  1.3,
  1.4,
  1.5,
  1.3,
  1.2,
  1.6,
  1.6,
  1.6,
  2.1,
  1.6,
  1.7,
  1.9,
  1.4,
  1.5,
  1.4,
  1.3,
  1.4,
  1.6,
  1.5,
  1.6,
  1.5,
  1.7,
  1.8,
  1.6,
  1.9,
  1.7,
  1.8,
  1.7,
  1.7,
  1.7,
  1.9,
  1.9,
  1.4,
  1.9,
  1.4,
  1.7,
  1.4,
  1.7,
  1.5,
  1.7,
  1.7,
  1.7,
  1.3,
  1.4,
  1.3,
  1.2,
  1.8,
  1.2,
  1.4,
  1.5,
  1.8,
  1.9,
  1.5,
  1.5,
  1.6,
  1.5,
  2.6,
  1.5,
  1.5,
  1.6,
  3.1,
  1.7,
  1.4,
  4.2,
  3.3,
  4.2,
  4.5,
  5.3,
  5.9,
  5.6,
  5.6,
  3.4,
  2.3,
  4.6,
  6.8,
  4.9,
  5.3,
  5.6,
  5.9,
  5.3,
  3.5,
  2.2,
  3.2,
  2.2,
  1.7,
  1.9,
  2.5,
  1.9,
  1.3,
  2.7,
  3.1,
  4.2,
  1.6,
  3.4,
  4.9,
  3.9,
  6.2,
  5.6,
  5.3,
  2.1,
  3.8,
  6.1,
  5.6,
  5.3,
  5.2,
  2.5,
  2.9,
  2.1,
  1.8,
  1.3,
  1.2,
  1.2,
  1.5,
  1.4,
  1.2,
  1.2,
  1.3,
  1.3,
  1.5,
  1.7,
  1.9,
  1.5,
  1.2,
  1.2,
  1.2,
  1.3,
  1.9,
  1.3,
  1.2,
  1.2,
  1.3,
  1.3,
  1.4,
  1.4,
  1.8,
  1.8,
  1.4,
  1.6,
  1.8,
  1.6,
  1.6,
  1.4,
  1.4,
  1.5,
  1.4,
  1.5,
  1.6,
  1.5,
  1.2,
  1.2,
  1.3,
  1.8,
  1.7,
  1.9,
  1.7,
  1.6,
  1.7,
  1.6,
  1.6,
  1.6,
  1.9,
  1.7,
  1.8,
  1.7,
  1.4,
  1.8,
  1.5,
  1.2,
  1.4,
  1.2,
  1.3,
  1.8,
  1.3,
  1.6,
  1.6,
  1.7,
  1.6,
  1.5,
  1.6,
  1.9,
  1.5,
  1.5,
  1.7,
  1.4,
  1.4,
  1.8,
  1.8,
  1.9,
  1.9,
  1.7,
  1.8,
  1.9,
  1.7,
  1.8,
  1.9,
  1.9,
  1.8,
  1.8,
  1.9,
  1.9,
  1.8,
  1.6,
  1.9,
  1.5,
  1.2,
  1.5,
  1.8,
  1.7,
  1.3,
  1.5,
  1.7,
  1.8,
  1.6,
  1.9,
  1.7,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.5,
  1.8,
  1.7,
  1.7,
  1.9,
  1.7,
  1.7,
  1.9,
  1.8,
  1.9,
  1.9,
  1.6,
  1.4,
  1.8,
  1.5,
  1.3,
  2.3,
  1.5,
  1.3,
  1.2,
  1.6,
  1.9,
  1.9,
  1.7,
  1.7,
  1.8,
  1.3,
  1.2,
  1.4,
  1.6,
  2.1,
  1.4,
  1.2,
  2.7,
  2.6,
  1.8,
  1.9,
  3.1,
  1.9,
  1.7,
  1.6,
  1.9,
  1.9,
  2.3,
  2.2,
  2.2,
  1.7,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.3,
  1.7,
  1.6,
  1.5,
  1.4,
  1.3,
  1.9,
  1.1,
  1.3,
  1.3,
  1.2,
  1.2,
  1.2,
  1.4,
  1.3,
  1.3,
  1.2,
  1.2,
  2.7,
  1.2,
  1.7,
  1.3,
  1.2,
  1.3,
  1.2,
  1.2,
  1.3,
  1.4,
  1.2,
  1.2,
  1.3,
  1.8,
  2.3,
  1.9,
  2.9,
  1.3,
  1.2,
  2.2,
  1.6,
  1.2,
  1.2,
  1.3,
  1.4,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.3,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  ...],
 'met_min_inactive': 15,
 'met_min_low': 98,
 'met_min_medium': 189,
 'met_min_high': 0,
 'target_calories': 450,
 'target_km': 10.0,
 'target_miles': 6.21371,
 'to_target_km': 1.5,
 'to_target_miles': 0.9320565000000001,
 'score': 90,
 'score_meet_daily_targets': 78,
 'score_move_every_hour': 95,
 'score_recovery_time': 98,
 'score_stay_active': 82,
 'score_training_frequency': 100,
 'score_training_volume': 100,
 'total': 257}

Notebook
Last updated 1 year, 4 months ago

Interactive Dashboards for Spotify and Oura Ring Data

If you want to run this notebook and run into problems or have questions: Reach out to Bastian on Twitter or Slack

This notebook is an attempt at making an interactive dashboard to correlate many of the different variables tracked by either the Oura Ring or Spotify through the use of the plotly library along with interactive widges for Jupyter notebooks.

Ironically, this dashboard currently doesn't work well in the voila dashboard view, which means you should select Edit & Run in the Exploratory to render it in the regular Jupyter interface! Select Cell and then Run All from the menu in the Jupyter interface (This is because the plotly library is currently not installed by default and takes a while to install).

For this notebook to work you should have at least one of those two data sources connected to your Open Humans account:

With that out of the way, we'll get started to load the libraries and data and process it. Feel free to skip to the very end of the notebook to see the plots!

In [4]:
import sys
!conda install --yes --prefix {sys.prefix} plotly

# Standard Data Science Helpers
import numpy as np
import pandas as pd
import scipy
import plotly.graph_objects as go
import plotly.express as px
from IPython.display import Image, display, HTML
import ipywidgets as widgets
from ipywidgets import interact, interact_manual
In [5]:
### GET DATA FOR RESCUETIME, OURA AND SPOTIFY

from ohapi import api
import os
import requests
import tempfile
import json 
import pandas as pd
from datetime import datetime

oura_present = ""
rescuetime_present = ""
spotify_present = ""

df_moment = ""
dataframe_oura_full = ""
rt_df_full = ""
df_spotify = ""

user_details = api.exchange_oauth2_member(os.environ.get('OH_ACCESS_TOKEN'))
for i in user_details['data']:
    if i['source'] == 'direct-sharing-184' and i['basename'] == 'oura-data.json':
        oura = json.loads(requests.get(i['download_url']).content)
        oura_present = "True"
    if i['source'] == 'direct-sharing-176' and i['basename'] == 'spotify-listening-archive.json':
        sp_songs = requests.get(i['download_url'])
        sp_data = json.loads(sp_songs.content)
        spotify_present = "True"
    if i['source'] == 'direct-sharing-176' and i['basename'] == 'spotify-track-metadata.json':
        sp_meta = requests.get(i['download_url'])
        sp_metadata = json.loads(sp_meta.content)
        
### PARSERS FOR OURA, SPOTIFY & RESCUETIME
def read_oura(oura):

    dates = []
    values = []
    value_type = []

    for sdate in oura['sleep']:
        dates.append(sdate['summary_date'])
        values.append(sdate['score'])
        value_type.append('sleep: score')
        dates.append(sdate['summary_date'])
        values.append(sdate['total'])
        value_type.append('sleep: sleep sum')
        dates.append(sdate['summary_date'])
        values.append(sdate['hr_lowest'])
        value_type.append('sleep: hr_lowest')
        dates.append(sdate['summary_date'])
        values.append(sdate['hr_average'])
        value_type.append('sleep: hr_average')
        dates.append(sdate['summary_date'])
        values.append(sdate['rmssd'])
        value_type.append('sleep: rmssd')
        dates.append(sdate['summary_date'])
        values.append(sdate['rem'])
        value_type.append('sleep: rem')
        dates.append(sdate['summary_date'])
        values.append(sdate['restless'])
        value_type.append('sleep: restless')
        dates.append(sdate['summary_date'])
        values.append(sdate['awake'])
        value_type.append('sleep: awake')
        dates.append(sdate['summary_date'])
        values.append(sdate['light'])
        value_type.append('sleep: light')
        dates.append(sdate['summary_date'])
        values.append(sdate['deep'])
        value_type.append('sleep: deep')
        dates.append(sdate['summary_date'])
        values.append(sdate['breath_average'])
        value_type.append('sleep: breath_average')
        dates.append(sdate['summary_date'])
        values.append(sdate['onset_latency'])
        value_type.append('sleep: onset_latency')
        dates.append(sdate['summary_date'])
        values.append(sdate['temperature_delta'])
        value_type.append('sleep: temperature_delta')

        
        
    for sdate in oura['activity']:
        dates.append(sdate['summary_date'])
        if 'score' in sdate.keys():
            values.append(sdate['score'])
        else:
            values.append(0)
        value_type.append('activity: score')
        dates.append(sdate['summary_date'])
        values.append(sdate['steps'])
        value_type.append('activity: steps')
        dates.append(sdate['summary_date'])
        values.append(sdate['cal_active'])
        value_type.append('activity: cal active')
        dates.append(sdate['summary_date'])
        values.append(sdate['cal_total'])
        value_type.append('activity: cal total')
        dates.append(sdate['summary_date'])
        values.append(sdate['daily_movement'])
        value_type.append('activity: daily movement')
        dates.append(sdate['summary_date'])
        values.append(sdate['high'])
        value_type.append('activity: high')
        dates.append(sdate['summary_date'])
        values.append(sdate['low'])
        value_type.append('activity: low')
        dates.append(sdate['summary_date'])
        values.append(sdate['inactive'])
        value_type.append('activity: inactive')
        dates.append(sdate['summary_date'])
        values.append(sdate['medium'])
        value_type.append('activity: medium')
        dates.append(sdate['summary_date'])
        values.append(sdate['rest'])
        value_type.append('activity: rest')
        dates.append(sdate['summary_date'])
        values.append(sdate['inactivity_alerts'])
        value_type.append('activity: inactivity alerts')
        dates.append(sdate['summary_date'])
        values.append(sdate['steps'])
        value_type.append('activity: total')

        
    for sdate in oura['readiness']:
        dates.append(sdate['summary_date'])
        values.append(sdate['score'])
        value_type.append('readiness score')


    dataframe = pd.DataFrame(
        data = {
            'date': dates,
            'value': values,
            'type': value_type
        }
    )
    return dataframe

def read_rescuetime(rescuetime_data):
    date = []
    time_spent_seconds = []
    activity = []
    category = []
    productivity = []
    for element in rescuetime_data['rows']:
        date.append(element[0])
        time_spent_seconds.append(element[1])
        activity.append(element[3])
        category.append(element[4])
        productivity.append(element[5])
    date = [datetime.strptime(dt,"%Y-%m-%dT%H:%M:%S") for dt in date]

    rt_df = pd.DataFrame(data={
        'date': date,
        'time_spent_seconds': time_spent_seconds,
        'activity': activity,
        'category': category,
        'productivity': productivity
    })
    return rt_df

def parse_timestamp(lst):
    timestamps = []
    for item in lst:
        try:
            timestamp = datetime.strptime(
                            item,
                            '%Y-%m-%dT%H:%M:%S.%fZ')
        except ValueError:
            timestamp = datetime.strptime(
                    item,
                    '%Y-%m-%dT%H:%M:%SZ')
        timestamps.append(timestamp)
    return timestamps

def read_spotify(sp_data, sp_metadata):
    track_title = []
    artist_name = []
    album_name = []
    played_at = []
    popularity = []
    duration_ms = []
    explicit = []
    track_id = []

    danceability = []
    energy = [] 
    key = [] 
    loudness = [] 
    mode = []
    speechiness = []
    acousticness = []
    instrumentalness = []
    liveness = []
    valence = []
    tempo = []

    ['danceability', 'energy', 'key', 'loudness', 'mode', 'speechiness', 'acousticness', 'instrumentalness', 'liveness', 'valence','tempo']


    key_translation = {
        '0': "C",
        "1": "C#",
        "2": "D",
        "3": "D#",
        "4": "E", 
        "5": "F",
        "6": "F#",
        "7": "G",
        "8": "G#",
        "9": "A",
        "10": "A#",
        "11": "B"
    }

    mode_translation = {'1':'major', '0': 'minor'}

    for sp in sp_data:
        if sp['track']['id'] in sp_metadata.keys():
            track_title.append(sp['track']['name'])
            artist_name.append(sp['track']['artists'][0]['name'])
            album_name.append(sp['track']['album']['name'])
            played_at.append(sp['played_at'])
            popularity.append(sp['track']['popularity'])
            duration_ms.append(sp['track']['duration_ms'])
            explicit.append(sp['track']['explicit'])
            track_id.append(sp['track']['id'])
            danceability.append(sp_metadata[sp['track']['id']]['danceability'])
            energy.append(sp_metadata[sp['track']['id']]['energy'])
            key.append(key_translation[str(sp_metadata[sp['track']['id']]['key'])])
            loudness.append(sp_metadata[sp['track']['id']]['loudness'])
            mode.append(mode_translation[str(sp_metadata[sp['track']['id']]['mode'])])
            speechiness.append(sp_metadata[sp['track']['id']]['speechiness'])
            acousticness.append(sp_metadata[sp['track']['id']]['acousticness'])
            instrumentalness.append(sp_metadata[sp['track']['id']]['instrumentalness'])
            liveness.append(sp_metadata[sp['track']['id']]['liveness'])
            valence.append(sp_metadata[sp['track']['id']]['valence'])
            tempo.append(sp_metadata[sp['track']['id']]['tempo'])



    played_at = parse_timestamp(played_at)

    dataframe = pd.DataFrame(data={
        'track_id': track_id,
        'track': track_title,
        'artist': artist_name,
        'album': album_name,
        'popularity': popularity,
        'duration_ms': duration_ms,
        'explicit': explicit,
        'played_at': played_at,
        'danceability': danceability,
        'energy': energy,
        'key': key,
        'loudness': loudness,
        'mode': mode,
        'speechiness': speechiness,
        'acousticness': acousticness,
        'instrumentalness': instrumentalness,
        'liveness': liveness,
        'valence': valence,
        'tempo': tempo

    })
    dataframe = dataframe
    return dataframe

Oura Ring data exploration

Now we're getting to the first interactive plot. Below is the visualization and settings for the Oura data. You can select which data should be shown on the X & Y axis, along with the visualizations for the data distribution that you want to be shown on the margins. You can also opt in to see a linear or local fitting of the data, depending on your preference (this works only for numeric data, not for dates yet).

You can hover over each data point, the marginal plots etc and also zoom in/out for your regions of interest.

In [6]:
### CREATE DATAFRAMES
if oura_present:
    dataframe_oura_full = read_oura(oura)
    oura_pivot = dataframe_oura_full.pivot_table(index='date',columns='type',values='value')
    oura_pivot = oura_pivot.reset_index()
    
    
    def plot_oura(x, y,marginal,fit):
        marginal_x = None
        marginal_y = None
        trendline = None
        if marginal != 'none':        
            if oura_pivot[x].dtypes == 'float64':
                marginal_x = marginal
            if oura_pivot[y].dtypes == 'float64':
                marginal_y = marginal
        if marginal_x and marginal_y:
            if fit == 'linear (ols)':
                trendline = 'ols'
            if fit == 'loess':
                trendline = 'lowess'
        fig = px.scatter(oura_pivot, x=x, y=y, hover_data=[x,y,'date'], marginal_y=marginal_y,
                marginal_x=marginal_x, trendline=trendline, template="simple_white")
        fig.show()


    _ = widgets.interact(
        plot_oura, 
        x=oura_pivot.columns,
        y=oura_pivot.columns,
        marginal=['violin','box','none'],
        fit=['linear (ols)','loess','none']
    )

Visualizing the Spotify data!

Now we're getting to the second interactive plot. Below is the visualization and settings for the Spotify data. You can select which data should be shown on the X & Y axis, along with the visualizations for the data distribution that you want to be shown on the margins. You can also opt in to see a linear or local fitting of the data, depending on your preference (this works only for numeric data, not for dates yet).

You can hover over each data point, the marginal plots etc and also zoom in/out for your regions of interest.

In [10]:
oura['activity'][-1]
Out[10]:
{'summary_date': '2022-11-26',
 'timezone': 0,
 'day_start': '2022-11-26T04:00:00+00:00',
 'day_end': '2022-11-27T03:59:59Z',
 'cal_active': 22,
 'cal_total': 1723,
 'class_5min': '11111111111111111111111111111111111111111111111111111111111111111111111123333',
 'steps': 524,
 'daily_movement': 506,
 'non_wear': 0,
 'rest': 367,
 'inactive': 5,
 'low': 12,
 'medium': 1,
 'high': 0,
 'inactivity_alerts': 0,
 'average_met': 1,
 'met_1min': [1.7,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  1.1,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.4,
  0.9,
  0.9,
  1.0,
  1.2,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  1.0,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  1.0,
  0.9,
  0.9,
  0.9,
  1.1,
  1.0,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  1.2,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.0,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  1.0,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  1.2,
  0.9,
  1.3,
  1.8,
  2.3,
  1.2,
  1.2,
  1.2,
  1.6,
  1.4,
  2.7,
  3.5,
  1.4,
  2.9,
  3.1,
  2.9,
  3.3,
  3.8,
  3.8,
  4.6,
  2.1,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  0.9,
  ...],
 'met_min_inactive': 0,
 'met_min_low': 16,
 'met_min_medium': 3,
 'met_min_high': 0,
 'target_calories': 450,
 'target_km': 9.0,
 'target_miles': 5.592339,
 'to_target_km': 8.7,
 'to_target_miles': 5.4059276999999994,
 'score': 95,
 'score_meet_daily_targets': 100,
 'score_move_every_hour': 100,
 'score_recovery_time': 100,
 'score_stay_active': 71,
 'score_training_frequency': 100,
 'score_training_volume': 99,
 'rest_mode_state': 0,
 'total': 13}
In [4]:
if spotify_present:
    df_spotify = read_spotify(sp_data, sp_metadata)
    def plot_spotify(x, y,marginal,fit):
        marginal_x = None
        marginal_y = None
        trendline = None
        if marginal != 'none':        
            if df_spotify[x].dtypes == 'float64' or df_spotify[x].dtypes == 'int64':
                marginal_x = marginal
            if df_spotify[y].dtypes == 'float64' or df_spotify[x].dtypes == 'int64':
                marginal_y = marginal
        if marginal_x and marginal_y:
            if fit == 'linear (ols)':
                trendline = 'ols'
            if fit == 'loess':
                trendline = 'lowess'
        fig = px.scatter(df_spotify, x=x, y=y,marginal_y=marginal_y, hover_data=[x,y,'played_at'],
                marginal_x=marginal_x, trendline=trendline, template="simple_white")
        fig.show()


    _ = widgets.interact(
        plot_spotify, 
        x=['popularity','duration_ms','played_at','danceability','energy','loudness','tempo','acousticness','valence'],
        y=['popularity','duration_ms','played_at','danceability','energy','loudness','tempo','acousticness','valence'],
        marginal=['violin','box','none'],
        fit=['linear (ols)','loess','none']
    )

Have fun exploring your data, and join #self-research in the OH Slack if you found something interesting you want to share!

In [ ]:

In [9]:
oura['activity'][0]
Out[9]:
{'summary_date': '2018-11-06',
 'timezone': -480,
 'day_start': '2018-11-06T04:00:00-08:00',
 'day_end': '2018-11-07T03:59:59-08:00',
 'cal_active': 375,
 'cal_total': 2531,
 'class_5min': '0000000000000000000000000000000000000000000000000000000000000322222232322222222321234432222112344423422323222322232322332222223233332222233322323444433444322223222323222233322323322323332222222232222222221222222222222222222211122111221111111111111111111111111111111111111111111111111',
 'steps': 9082,
 'daily_movement': 6197,
 'non_wear': 308,
 'rest': 410,
 'inactive': 465,
 'low': 199,
 'medium': 58,
 'high': 0,
 'inactivity_alerts': 1,
 'average_met': 1.34375,
 'met_1min': [0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  0.1,
  2.8,
  2.9,
  1.6,
  1.3,
  1.8,
  1.5,
  1.6,
  1.4,
  1.2,
  1.5,
  1.3,
  1.3,
  1.3,
  1.1,
  1.2,
  1.2,
  1.6,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.3,
  1.4,
  1.2,
  1.3,
  1.3,
  1.6,
  1.9,
  2.3,
  1.7,
  1.6,
  1.9,
  2.2,
  1.7,
  1.5,
  1.7,
  1.9,
  1.5,
  1.4,
  1.9,
  1.8,
  1.8,
  1.5,
  1.5,
  1.5,
  1.4,
  1.5,
  1.3,
  1.9,
  1.7,
  1.6,
  1.6,
  1.4,
  1.2,
  1.2,
  1.3,
  1.2,
  1.3,
  1.2,
  1.2,
  1.1,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.1,
  1.0,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.5,
  1.6,
  1.4,
  1.3,
  1.2,
  1.3,
  1.3,
  1.5,
  1.2,
  1.3,
  1.5,
  1.9,
  2.4,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.9,
  1.7,
  2.1,
  4.2,
  2.4,
  3.9,
  7.1,
  4.7,
  5.5,
  4.4,
  4.8,
  5.3,
  5.2,
  2.6,
  4.6,
  2.5,
  1.3,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.5,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.1,
  1.0,
  1.0,
  1.0,
  1.1,
  1.0,
  1.2,
  1.1,
  0.9,
  0.9,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  0.0,
  1.3,
  1.8,
  1.5,
  1.3,
  2.0,
  3.3,
  2.1,
  5.6,
  5.2,
  2.1,
  5.2,
  3.7,
  4.8,
  5.5,
  5.3,
  3.4,
  5.1,
  5.8,
  5.2,
  5.3,
  4.6,
  2.5,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  2.4,
  5.1,
  5.1,
  1.9,
  3.7,
  5.2,
  3.5,
  1.7,
  1.4,
  1.3,
  1.7,
  1.3,
  1.4,
  1.6,
  1.3,
  1.3,
  1.3,
  2.0,
  1.3,
  1.8,
  1.2,
  1.5,
  2.1,
  1.2,
  1.4,
  1.6,
  1.9,
  1.3,
  1.8,
  2.7,
  1.7,
  1.6,
  1.9,
  1.5,
  1.1,
  1.3,
  1.2,
  1.4,
  1.7,
  1.8,
  1.4,
  1.3,
  1.7,
  1.9,
  1.5,
  1.6,
  1.5,
  1.4,
  2.3,
  1.8,
  2.3,
  1.3,
  1.1,
  1.3,
  1.2,
  1.2,
  1.2,
  1.1,
  1.2,
  1.2,
  1.9,
  1.6,
  1.3,
  1.4,
  1.4,
  1.2,
  1.2,
  2.2,
  1.8,
  1.3,
  1.2,
  1.2,
  1.3,
  1.4,
  1.3,
  1.3,
  1.8,
  1.7,
  1.5,
  1.8,
  1.5,
  1.3,
  1.6,
  1.6,
  1.5,
  1.7,
  1.6,
  1.4,
  1.5,
  1.7,
  1.6,
  1.5,
  1.7,
  3.5,
  1.7,
  1.6,
  1.9,
  1.9,
  1.4,
  1.5,
  1.7,
  1.3,
  1.2,
  1.5,
  1.6,
  3.1,
  1.8,
  1.4,
  1.3,
  1.4,
  1.3,
  1.3,
  1.5,
  1.2,
  1.3,
  1.5,
  1.7,
  1.5,
  1.4,
  1.5,
  1.4,
  1.4,
  1.3,
  1.4,
  1.6,
  1.5,
  1.4,
  1.4,
  1.3,
  1.4,
  1.7,
  1.9,
  1.7,
  1.9,
  1.7,
  1.6,
  1.6,
  1.6,
  1.8,
  1.7,
  1.7,
  1.8,
  1.4,
  1.9,
  1.9,
  1.9,
  1.7,
  1.6,
  1.8,
  1.9,
  1.7,
  2.1,
  1.9,
  1.7,
  1.8,
  1.9,
  1.8,
  1.9,
  1.8,
  1.6,
  1.7,
  1.5,
  1.5,
  1.5,
  1.7,
  1.3,
  1.4,
  1.5,
  1.3,
  1.2,
  1.6,
  1.6,
  1.6,
  2.1,
  1.6,
  1.7,
  1.9,
  1.4,
  1.5,
  1.4,
  1.3,
  1.4,
  1.6,
  1.5,
  1.6,
  1.5,
  1.7,
  1.8,
  1.6,
  1.9,
  1.7,
  1.8,
  1.7,
  1.7,
  1.7,
  1.9,
  1.9,
  1.4,
  1.9,
  1.4,
  1.7,
  1.4,
  1.7,
  1.5,
  1.7,
  1.7,
  1.7,
  1.3,
  1.4,
  1.3,
  1.2,
  1.8,
  1.2,
  1.4,
  1.5,
  1.8,
  1.9,
  1.5,
  1.5,
  1.6,
  1.5,
  2.6,
  1.5,
  1.5,
  1.6,
  3.1,
  1.7,
  1.4,
  4.2,
  3.3,
  4.2,
  4.5,
  5.3,
  5.9,
  5.6,
  5.6,
  3.4,
  2.3,
  4.6,
  6.8,
  4.9,
  5.3,
  5.6,
  5.9,
  5.3,
  3.5,
  2.2,
  3.2,
  2.2,
  1.7,
  1.9,
  2.5,
  1.9,
  1.3,
  2.7,
  3.1,
  4.2,
  1.6,
  3.4,
  4.9,
  3.9,
  6.2,
  5.6,
  5.3,
  2.1,
  3.8,
  6.1,
  5.6,
  5.3,
  5.2,
  2.5,
  2.9,
  2.1,
  1.8,
  1.3,
  1.2,
  1.2,
  1.5,
  1.4,
  1.2,
  1.2,
  1.3,
  1.3,
  1.5,
  1.7,
  1.9,
  1.5,
  1.2,
  1.2,
  1.2,
  1.3,
  1.9,
  1.3,
  1.2,
  1.2,
  1.3,
  1.3,
  1.4,
  1.4,
  1.8,
  1.8,
  1.4,
  1.6,
  1.8,
  1.6,
  1.6,
  1.4,
  1.4,
  1.5,
  1.4,
  1.5,
  1.6,
  1.5,
  1.2,
  1.2,
  1.3,
  1.8,
  1.7,
  1.9,
  1.7,
  1.6,
  1.7,
  1.6,
  1.6,
  1.6,
  1.9,
  1.7,
  1.8,
  1.7,
  1.4,
  1.8,
  1.5,
  1.2,
  1.4,
  1.2,
  1.3,
  1.8,
  1.3,
  1.6,
  1.6,
  1.7,
  1.6,
  1.5,
  1.6,
  1.9,
  1.5,
  1.5,
  1.7,
  1.4,
  1.4,
  1.8,
  1.8,
  1.9,
  1.9,
  1.7,
  1.8,
  1.9,
  1.7,
  1.8,
  1.9,
  1.9,
  1.8,
  1.8,
  1.9,
  1.9,
  1.8,
  1.6,
  1.9,
  1.5,
  1.2,
  1.5,
  1.8,
  1.7,
  1.3,
  1.5,
  1.7,
  1.8,
  1.6,
  1.9,
  1.7,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.5,
  1.8,
  1.7,
  1.7,
  1.9,
  1.7,
  1.7,
  1.9,
  1.8,
  1.9,
  1.9,
  1.6,
  1.4,
  1.8,
  1.5,
  1.3,
  2.3,
  1.5,
  1.3,
  1.2,
  1.6,
  1.9,
  1.9,
  1.7,
  1.7,
  1.8,
  1.3,
  1.2,
  1.4,
  1.6,
  2.1,
  1.4,
  1.2,
  2.7,
  2.6,
  1.8,
  1.9,
  3.1,
  1.9,
  1.7,
  1.6,
  1.9,
  1.9,
  2.3,
  2.2,
  2.2,
  1.7,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.3,
  1.7,
  1.6,
  1.5,
  1.4,
  1.3,
  1.9,
  1.1,
  1.3,
  1.3,
  1.2,
  1.2,
  1.2,
  1.4,
  1.3,
  1.3,
  1.2,
  1.2,
  2.7,
  1.2,
  1.7,
  1.3,
  1.2,
  1.3,
  1.2,
  1.2,
  1.3,
  1.4,
  1.2,
  1.2,
  1.3,
  1.8,
  2.3,
  1.9,
  2.9,
  1.3,
  1.2,
  2.2,
  1.6,
  1.2,
  1.2,
  1.3,
  1.4,
  1.2,
  1.2,
  1.2,
  1.3,
  1.2,
  1.3,
  1.2,
  1.2,
  1.3,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  1.2,
  ...],
 'met_min_inactive': 15,
 'met_min_low': 98,
 'met_min_medium': 189,
 'met_min_high': 0,
 'target_calories': 450,
 'target_km': 10.0,
 'target_miles': 6.21371,
 'to_target_km': 1.5,
 'to_target_miles': 0.9320565000000001,
 'score': 90,
 'score_meet_daily_targets': 78,
 'score_move_every_hour': 95,
 'score_recovery_time': 98,
 'score_stay_active': 82,
 'score_training_frequency': 100,
 'score_training_volume': 100,
 'total': 257}
In [ ]: