This Jupyter notebook is dedicated to assessing the accuracy of sleep data collected by two different sleep analysis devices. The objective is to compare and contrast the sleep details reported by each device, focusing on metrics such as sleep duration, sleep states data.
To facilitate a straightforward way for users to validate and explore the analysis presented in this notebook, a sample data file has been included in the repository. This sample data pertains to the sleep analysis results for a specific date, allowing for a focused review of the methods and findings.
Sample Data Overview Date of Interest: 11-1-2024 Subject: P1
The analysis utilizes sleep data from the following devices:
-
fitbit charge 5: It is assumed to provide sleep-related data that can be compared with another device.
-
Withings Sleep Analyzer: Detailed inspection and analysis of sleep data obtained from the Withings device are included. This device is known for providing comprehensive sleep cycle analysis, including sleep duration, interruptions, and sleep stages.
The notebook approaches the comparison by:
- Inspecting the data structure and content provided by the Withings device.
- Preparing the data from both devices for analysis, including cleaning and normalization steps as necessary.
- Comparing sleep metrics between the two devices to assess accuracy and consistency.
Before running the notebook, ensure you have the following:
- Python 3.x installed.
- Necessary Python libraries installed, including
pandas
,numpy
,matplotlib
, and any other libraries used for data manipulation and visualization. - Sleep data from the two devices in a compatible format (the notebook should specify the required format, typically CSV).
To run the analysis:
- Ensure all required Python packages are installed.
- Place your sleep data files in the designated directory, as specified within the notebook.
- Open the notebook in Jupyter Lab or Jupyter Notebook and execute the cells in order, following any additional instructions provided within the notebook for loading and analyzing the data.