Caffeine is one of the most frequently consumed beverages that college students drink in order to get through late nights, early mornings, and constant deadlines. Using two sets of data from students and developers, this dashboard looks at how caffeine use affects sleep, stress, focus, and fatigue.
What this dashboard covers:
The data indicates that excessive caffeine consumption correlates with reduced sleep, heightened stress, and increased fatigue, trends that mirror the challenges of college life and the function of caffeine that is present.
What is this plot about? This plot displays average amount of caffeine present in 6 different caffeinated drinks. The water category represents drinks made through caffeinated powders that are mixed with water. This data was downloaded from [Kaggle] (https://www.kaggle.com/datasets). This bar chart visualizes the average caffeine content across six distinct drink categories. Each bar represents the mean caffeine (in mg) across all products sampled within that type, allowing for a clean cross-category comparison.
Caffeine in Drinks: This bar chart shows the distribution of drink entries across three caffeinated beverage categories in the dataset. Coffee dominates the sample with over 300 entries, followed by Tea with roughly 185, and Energy Drinks with the fewest at around 50. This imbalance in sample size is worth keeping in mind when interpreting averages, the coffee and tea figures are based on much larger samples than energy drinks.
Among the three drink types, Energy Drink had the highest average focus level (0.95), while Tea had the lowest (0.72). Coffee fell in between at 0.88.
Drink Type & Focus Level: This chart explores a self-reported or derived “focus level” metric across the same three drink types, scaled from 0 to 1. Energy Drinks score the highest average focus level (just above 0.9), followed closely by Coffee (around 0.85), while Tea trails noticeably at approximately 0.70. This suggests that higher-caffeine drinks tend to correlate with higher reported focus, though causality can’t be assumed, and the smaller energy drink sample size may affect reliability of that bar.
This dataset includes 500 students. The average sleep duration was 6.47 hours, with students consuming an average of 2.5 caffeinated beverages per day.
Caffeine Intake & Sleep This interactive chart tracks how the number of caffeinated beverages consumed per day affects both sleep duration and sleep quality among students. Hover over any point to see the exact values. Overall, the data shows that students who consume more caffeine tend to sleep fewer hours and report lower sleep quality, with the sharpest drops occurring between 0 and 3 drinks per day. Research shows that caffeine disrupts sleep quality in college students, particularly when consumed later in the day.
What is this plot about? This histogram shows the distribution of caffeine consumption among college students. Most students fall within a moderate range of caffeine intake, while fewer students consume very low or very high amounts. The shape of the distribution suggests that caffeine consumption is slightly right-skewed, indicating the presence of some high-consumption individuals.
Caffeine Intake for College Students: This scatter plot illustrates the relationship between age and caffeine consumption among college students. The data points show variability in caffeine intake across ages, and the trend line indicates no clear relationship between age and consumption. This suggests that within the college-age range, age is not a strong predictor of caffeine intake.
Average Caffeine Consumption This line plot shows the average consumption of caffeine in college students. The trend illustrates how caffeine consumption changes as age increases, with showing a rise until the age of 20, then a heavy fall at the age of 21.
This bar chart displays the drinks with the highest caffeine content. It highlights the significant variation in caffeine levels across beverages, with certain drinks containing substantially more caffeine than others. This helps explain why some students may have much higher overall caffeine intake depending on their beverage choices.
Caffeine is one of the most widely consumed substances among college students — used to push through late nights, early mornings, and constant deadlines. But what does it actually do to mental health? This dashboard explores the relationship between caffeine consumption and key mental health indicators including stress levels and fatigue using two datasets collected from students and developers.
Stress & Caffeine: Stress levels tend to rise with increased coffee consumption. Students consuming 4+ cups per day show the highest average stress, possibly reflecting a cycle where stress drives more caffeine use, which in turn increases stress.
Fatigue & Caffeine: The trend line shows fatigue increases with more coffee consumed per day. This likely reflects caffeine’s crash effect — short energy spikes followed by deeper tiredness — and may indicate students are masking underlying sleep deprivation.
This dashboard was created using Quarto in RStudio, and the R Language and Environment.
The data used to create this dashboard were downloaded from:
KaggleAllaire J, Dervieux C (2024). quarto: R Interface to ‘Quarto’ Markdown Publishing System. R package version 1.4.4, https://CRAN.R-project.org/package=quarto.
Arnold J (2024). ggthemes: Extra Themes, Scales and Geoms for ‘ggplot2’. R package version 5.1.0, https://github.com/jrnold/ggthemes, https://jrnold.github.io/ggthemes/.
Auguie B (2017). gridExtra: Miscellaneous Functions for “Grid” Graphics. R package version 2.3.
Bache S, Wickham H (2025). magrittr: A Forward-Pipe Operator for R. doi:10.32614/CRAN.package.magrittr https://doi.org/10.32614/CRAN.package.magrittr, R package version 2.0.4, https://CRAN.R-project.org/package=magrittr.
Dancho M, Vaughan D (2025). tidyquant: Tidy Quantitative Financial Analysis. R package version 1.0.11, https://business-science.github.io/tidyquant/.
Kunst J (2022). highcharter: A Wrapper for the ‘Highcharts’ Library. R package version 0.9.4, https://CRAN.R-project.org/package=highcharter.
Neuwirth E (2022). RColorBrewer: ColorBrewer Palettes. R package version 1.1-3, https://CRAN.R-project.org/package=RColorBrewer.
Posit team (2025). RStudio: Integrated Development Environment for R. Posit Software, PBC, Boston, MA. URL http://www.posit.co/.
R Core Team (2025). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria.https://www.R-project.org/.
Rinker, T. W. & Kurkiewicz, D. (2017). pacman: Package Management for R. version 0.5.0. Buffalo, New York. http://github.com/trinker/pacman
Vanderkam D, Allaire J, Owen J, Gromer D,Thieurmel B (2018). dygraphs: Interface to’Dygraphs’ Interactive Time Series Charting Library. R package version 1.1.1.6, https://github.com/rstudio/dygraphs.
Wickham H, Averick M, Bryan J, Chang W, McGowan LD, François R, Grolemund G, Hayes A, Henry L, Hester J, Kuhn M, Pedersen TL, Miller E, Bache SM, Müller K, Ooms J, Robinson D, Seidel DP, Spinu V, Takahashi K, Vaughan D, Wilke C, Woo K, Yutani H (2019). “Welcome to the tidyverse.” Journal of Open Source Software, 4(43), 1686. doi:10.21105/joss.01686 https://doi.org/10.21105/joss.01686.
Xie Y (2025). knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.50, https://yihui.org/knitr/.
Yihui Xie (2015) Dynamic Documents with R and knitr. 2nd edition. Chapman and Hall/CRC. ISBN 978-1498716963
Yihui Xie (2014) knitr: A Comprehensive Tool for Reproducible Research in R. In Victoria Stodden, Friedrich Leisch and Roger D. Peng, editors, Implementing Reproducible Computational Research. Chapman and Hall/CRC. ISBN 978-1466561595
Zhu H (2024). kableExtra: Construct Complex Table with ‘kable’ and Pipe Syntax. R package version 1.4.0, https://github.com/haozhu233/kableExtra, http://haozhu233.github.io/kableExtra/.