The project is aimed at helping people with sleep fragmentation and health data from a consumer wearable. The python program analyzes my RingConn Gen 2 sleep data and generates graphical and statistical analysis of useful patterns.
This repository contains code and resources for analyzing sleep, activity, and vitals data. It includes data cleaning, merging, statistical analysis, and visualization scripts, as well as Jupyter notebook support for interactive exploration.
- Data ingestion and cleaning
- Sleep, activity, and vitals data merging
- Statistical analysis (REM efficiency, nap effects, HRV)
- Visualizations (scatter plots, box plots, heatmaps)
- Jupyter notebook support
- Clone the repository.
- Install dependencies:
pip install -r requirements.txt - The repository includes the raw data file
AllRawData.csvand the results of the analysis (plots andanalysis_results.txt). - Run
sleep_analysis.pyor open the notebook for interactive analysis. Results and plots will be generated in the repository root.
sleep_analysis.py— Main analysis scriptnotebooks/— Jupyter notebooks for explorationdata/— Contains raw data files (e.g.,AllRawData.csv). Place any additional datasets here.results/— Contains analysis outputs:analysis_results.txt— Text summary of analysisrem_efficiency_scatter.png,nap_effect_latency.png,hrv_fragmentation.png,sleep_fragment_24h.png— Plots generated by the analysis
requirements.txt— Python dependencies.github/— Copilot and GitHub configuration
data/: This folder contains the raw data file(s) used for analysis. For example, AllRawData.csv should be placed here. You may add other datasets as needed.
results/: This folder contains the outputs generated by running the analysis, including plots and the summary text file. These files are included in the repository for reference and reproducibility.