The dataset I used for this project is called Sleep Health
and Lifestyle Dataset.
It contains data for 374 individuals, including information about their
age, gender, occupation, physical activity, stress level, and
sleep patterns.
The goal of this analysis is to explore how occupation affects sleep health — looking at how different types of jobs relate to sleep duration, quality, and stress.
In this report, I calculated some summary statistics and created five different visualizations to show patterns in the data. Each visualization highlights a unique aspect of the relationship between occupation and sleep.
Occupation | Sleep.Duration | Quality.of.Sleep | Stress.Level | Physical.Activity.Level |
---|---|---|---|---|
Software Engineer | 6.1 | 6 | 6 | 42 |
Doctor | 6.2 | 6 | 8 | 60 |
Doctor | 6.2 | 6 | 8 | 60 |
Sales Representative | 5.9 | 4 | 8 | 30 |
Sales Representative | 5.9 | 4 | 8 | 30 |
Software Engineer | 5.9 | 4 | 8 | 30 |
Teacher | 6.3 | 6 | 7 | 40 |
Doctor | 7.8 | 7 | 6 | 75 |
From this, we can see the dataset includes a mix of numeric and
categorical variables such as Sleep.Duration
,
Quality.of.Sleep
, Stress.Level
,
Physical.Activity.Level
, and Occupation
. There
are also health indicators like Heart.Rate
,
BMI.Category
, and Sleep.Disorder
, which help
explain lifestyle differences between groups.
Sleep.Duration_mean | Sleep.Duration_sd | Quality_mean | Quality_sd | Stress_mean | Stress_sd | Activity_mean | Steps_mean | HeartRate_mean |
---|---|---|---|---|---|---|---|---|
7.13 | 0.8 | 7.31 | 1.2 | 5.39 | 1.77 | 59.17 | 6816.84 | 70.17 |
On average, people in this dataset sleep between 6–7 hours per night with a sleep quality rating around 6–7 out of 10. Stress levels vary more widely, ranging from 1 to 10. The dataset captures a balanced mix of different activity levels and job types.
Interpretation:
This chart shows the distribution of how long people sleep by
occupation. The wider the violin, the more variation there is in sleep
time. Some jobs, like doctors or sales representatives,
show shorter and less consistent sleep, while engineers and
managers tend to have steadier, longer sleep patterns.
Interpretation:
This bar chart shows what percentage of people in each occupation report
no sleep disorder, insomnia, or sleep apnea. Healthcare
and sales jobs show a slightly higher rate of disorders compared to more
regular-schedule jobs like engineering or office work. This suggests
that stressful or irregular work schedules might be
linked to poor sleep health.
Interpretation:
This chart shows which occupations experience higher stress. Professions
like doctors and sales representatives tend to have
higher average stress levels, while jobs like teachers or
engineers have lower stress. This difference may partly explain
why sleep disorders and short sleep durations are more common in
high-stress professions.
Interpretation:
There’s a clear positive relationship — occupations with more
active workers generally report higher sleep quality and longer
average sleep durations. This supports the common idea that staying
physically active improves overall sleep health.
Interpretation:
The heatmap gives an overall snapshot of how each job ranks across
several health metrics. Jobs that show darker green
cells have higher averages, meaning better sleep or
healthier activity levels. We can see patterns where
high-activity jobs also score better on sleep quality,
and high-stress jobs show the opposite.
From this analysis, it’s clear that occupation has a noticeable impact on sleep health. Jobs with high stress and irregular hours — such as healthcare and sales — show worse sleep patterns and more reported disorders. Meanwhile, jobs with more predictable schedules and moderate activity, such as engineering and management, are linked to better sleep duration and quality.
Key takeaways: - Physical activity appears to
support better sleep outcomes.
- Stress management plays a major role in sleep health.
- Employers can help by promoting balanced work schedules and wellness
programs.