Analysing Garmin Sleep Data with Python and Power BI
4 min readMay 26, 2024
As someone keen on optimising my sleep patterns and improving wake time consistency, I embarked on a journey to analyse my sleep data using Python and Power BI. This post outlines the steps I took, from extracting data from my Garmin device to visualising it in Power BI, providing insights into my sleep patterns and areas for improvement.
Objectives
- Understand My Sleep Patterns Better: Analyse my nightly rest to identify trends and gain insights.
- Improve Wake-Up Consistency: Aim for a more regular wake-up time to enhance daily energy and well-being.
Overview of Steps
- Download Your Garmin Data: Visit the Garmin Connect IQ site and export your data.
- Locate the Sleep Data: Extract the zipped JSON format data, and navigate to
DI_CONNECT
thenDI_Connect_Wellness
where the JSON files are stored by date. - Save and Extract Data: Save these files into a folder on your computer.
- Python Data Extraction: Using Python, extract the data into a pandas DataFrame.
- Data Cleaning: Remove any null values to ensure data accuracy.
- Save as CSV: Save the cleaned DataFrame as a CSV file.
- Connect to Power BI…