Skip to content

Examples

Interactive Google Colab notebooks demonstrating various use cases.

Stress: 28-day rolling average

Open in Google Colab

Stress levels from one day to another can vary by extremes, but there's always a general trend. Using a scatter plot with a rolling average shows both the individual days and the trend. The Colab retrieves up to three years of daily data. If there's less than three years of data, it retrieves whatever is available.

Stress: Graph of 28-day rolling average

Sleep analysis over 90 days

Open in Google Colab

The Garmin Connect app only shows a maximum of seven days for sleep stages—making it hard to see trends. The Connect API supports retrieving daily sleep quality in 28-day pages, but that doesn't show details. Using SleepData.list() gives us the ability to retrieve an arbitrary number of days with enough detail to produce a stacked bar graph of the daily sleep stages.

Sleep stages over 90 days

One specific graph that's useful but not available in the Connect app is sleep start and end times over an extended period. This provides context to the sleep hours and stages.

Sleep times over 90 days

ChatGPT analysis of Garmin stats

Open in Google Colab

ChatGPT's Advanced Data Analysis can provide incredible insight into the data in a way that's much simpler than using Pandas and Matplotlib.

Start by using the linked Colab to download a CSV of the last three years of your stats, and upload the CSV to ChatGPT.

Here are example outputs:

How do I sleep on different days of the week?

Sleep by day of week

On what days do I exercise the most?

Exercise by day of week