Sleep and Lifestyle: A Data Story

Keshav Kumar Pulla

2025-06-04

Introduction

Sleep plays a critical role in mental, emotional, and physical well-being. Poor sleep has been linked to higher stress levels, lifestyle imbalance, and chronic health issues. In this data story, we examine how lifestyle and regional factors influence sleep quality and duration.

This exploration uses three public datasets:

  • Kaggle Sleep Health Dataset (individual-level health and lifestyle data)
  • CDC Adult Sleep by U.S. State (regional sleep trends)
  • OECD Time Use Data (global comparison, limited)

Dataset Overview

Exploring the Datasets
The Kaggle dataset contains attributes like age, gender, BMI, stress levels, physical activity, and sleep duration. We’ll focus on variables that have strong potential to influence sleep.
📊 Sample from Kaggle Sleep Dataset
person_id gender age occupation sleep_duration quality_of_sleep physical_activity_level stress_level bmi_category blood_pressure heart_rate daily_steps sleep_disorder
1 Male 27 Software Engineer 6.1 6 42 6 Overweight 126/83 77 4200 None
2 Male 28 Doctor 6.2 6 60 8 Normal 125/80 75 10000 None
3 Male 28 Doctor 6.2 6 60 8 Normal 125/80 75 10000 None
4 Male 28 Sales Representative 5.9 4 30 8 Obese 140/90 85 3000 Sleep Apnea
5 Male 28 Sales Representative 5.9 4 30 8 Obese 140/90 85 3000 Sleep Apnea

Correlation Matrix

Correlation Between Lifestyle and Sleep Duration

Insights: Correlation Matrix

The matrix highlights relationships among variables: - Stress and sleep: Strong negative correlation (higher stress → lower sleep). - Physical activity: Slight positive correlation with sleep. - BMI and age: Minimal impact on sleep duration.

These insights emphasize stress as a primary disruptor of sleep.

Sleep by Stress Level

Sleep Duration by Stress Level

Insights: Sleep by Stress Level

This boxplot further supports the correlation results. As stress levels increase, the median sleep duration decreases significantly. Individuals with stress level 1 or 2 tend to sleep more than those at level 4 or 5.

This reinforces the role of psychological well-being in sleep quality.

Short Sleep Prevalence by U.S. State

State-Wise Short Sleep Prevalence

Conclusion & Reflection

  • Strong inverse relationship between stress and sleep duration.
  • Physical activity shows a modest positive link.
  • U.S. state-level data highlights regional sleep disparities.

📌 OECD data was excluded due to missing values for sleep. It demonstrates the importance of checking dataset completeness.

This presentation highlights how combining health, regional, and behavioral data can uncover actionable insights into sleep health.

References