YourSleep
YourSleep - sleeping is a science
Inspiration
As high school students about to enter senior year, crawling out of bed dejected compared to waking up full of life has a great impact on our daily lives. Many of our peers also share this consensus, inspiring us to create our project that will change the lives of not just students, but anybody who has a busy schedule and struggles to wake up feeling refreshed and fully energized. Good sleep is a necessity for anyone looking to have a healthy lifestyle, as well as a must for any student to have a productive day of learning. Better sleep provides more energy throughout the day, better brain activity, as well as better mental health.
Current Issue
Having some experience using existing sleep cycle calculators, we have found that they are not always accurate for every person. This is a reasonable occurrence, as people’s bodies differ between different individuals. Sadly, most existing calculators do not take this into account, basing calculations purely on the user’s age as well as a rough generalization of 90 minutes per sleep cycle. This can sometimes result in a lack of practicality, not helping the user at all, as backed by personal experience from several of our team members. After we observed this, we realized that there could be a way to personalize a circadian rhythm calculator for any individual person, by prompting the user for a daily entry of how much they slept and how they felt when they woke up on a scale from 1-10.
Our Algorithm
With enough data points, the algorithm we made could accurately determine the length of the user’s sleep cycle up to within 3 minutes accuracy (as determined in testing). This is done by comparing the information to how a person should feel when waking up at different stages of a singular cycle. This was found through extensive research, during which our whole team learned a ton about how sleep affects individuals. By testing a wide range of potential cycle lengths, the best fit for the data can be found. Our algorithm was tested using machine-generated sample data specifically designed to include additional randomness to account for expected human error in choosing the rating on the scale. Our algorithm was able to accurately determine the sleep cycle length of the generated data when at least ten data points were provided. This would imply a week and a half of user entries, which is a reasonably small amount. Before the full week has passed, our calculator would just use the average cycle length based on age, while acquiring the necessary data to put the algorithm into use.
Building the Application
A major challenge we faced was implementing the idea we had in our heads into a real, accessible website. Before diving into this hackathon, 3 out of 4 of our group members had little to no experience in web development. With a website being the final product, if we did not do something fast, our four-man project would fall solely on a single person. Fortunately for us, we had two things: an experienced member ready to teach the rest of the group, and a wonderful workshop hosted by Kevin Cui on the nuts and bolts of building a website (the recordings were especially helpful since we could rewind several times). Utilizing both these assets, we quickly learned the basics of HTML and Javascript. With the help of an experienced member, we learned how to format pages using Tailwind CSS. This allowed the easy but time-consuming tasks such as writing and formatting text to be done by multiple people. It freed up time for more advanced features such as the Svelte Kit frontend framework. Because of these efforts, we were able to split the load on the website and complete it.
Design Principles
When building the website, we adhered to IBM design principles. Throughout the brainstorming process, we carefully considered our ideas, deciding which would be the most essential and help the most people. We acknowledged the fact that it is unlikely for most people to use a website on their computers every night before going to bed, so we also designed the website format to be compatible with cell phones and smaller screens. After deciding, we professionally executed the project, creating something designed for easy access for users.
Conclusion
This project has taken a step towards the future of ensuring healthy sleep habits for people around the world, progressing in a positive direction to make sure that everyone is physically and mentally healthy through the simple method of getting proper sleep.
Built With
- java
- python
- svelte
- tailwind
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.