top of page
Search

Project 1: Sleeping Habits

  • Writer: Hoanglan Nguyen
    Hoanglan Nguyen
  • Jan 11, 2022
  • 3 min read

Updated: Feb 2, 2022

Introduction to The Problem

What is the issue? At first, you want to go to sleep but then, there are loads of things you want to do so you want get things started before going to sleep. However, you weren't sure when will you be sleeping so you're just thinking "whenever I'm tired I sleep" mindset but you proceed to do you own things which past your bedtime and ends up staying up late at night. Hell yeah, no sleep gang but seriously, this could cause your health i.e. exhaustion.


You need to prioritize sleeping over anything so that you could your body is rested and recovered. A good sleep habit is when you go to sleep early and then, put your electronic devices further away from you. Also, you have to make sure to avoid eating large meals, caffeine, and alcohol before bedtime because these hinders you to sleep and may cause you to stay awake.


On this project, I would like to see if the individuals have enough sleep and how many hours of sleep during weeknight. Additionally, I will look into how often they reach their phone right next to them, how long will they be on the phone before going to sleep, and lastly, did they eat breakfast. I will include whether the individuals may or may not have sleep problems.


Datasets

The first data that I'm using is the sleep study from Kaggle and created by Michael Lomuscio who study the sleep habit of the individuals within the U.S. It is conducted as a pilot study to determine whether or not students were satisfied with the survey. Click the image for more info about this dataset.

The second data is focusing on the health habits of students (mostly university students) and it includes sleep problems, sleep hours, snoring, sleep timing, and ages. I do not include other variables because they are all not related to sleep habits and were just for lifestyle and health.


Pre-processing the Data

Before beginning the processing, I need to do the pre-processing step and check to see any nulls in the data set.


First, I have to import libraries that are used in this project. Very important since it importing them in will provide anything that comes with cool commands to create graphs and calculating numbers.





Then load in two data from .csv file obtained from Kaggle.


Then, identify the total amount of participants in these two data.




There are a few nulls there which is Hours so there is a duplicate, however, the duplicated numbers represent the students who have the exact the hours from each other so there's no need for that change.







As for the second data, it contains several duplicates and I'll remove the variables that's not related to this project. I will only use the strata, age, sleep hours, sleep problems, meal, diets, snoring, etc. from the list below.


Before: After:






















Data Visualizations












Findings

As expected, numbers of the participants does used their phones often when they got on the bed. More students slept almost 7-8 hours in both data and few of them slept less than 7 hours. A few slept for few hours such as 4 and 2 hours and another few slept for 10 hours. Even though they slept for more than 7 hours, they still have not have enough sleep and still remains tired.







References





 
 
 

Recent Posts

See All
My Thoughts on Coded Bias

So recently I watched this documentary called Coded Bias and it's pretty interesting to see the fallout of MIT Media Lab researcher Joy...

 
 
 

Comentarios


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2022 by HelenNguyen77. Proudly created with Wix.com

bottom of page