This dashboard presents a quantified-self analysis of a sleep and lifestyle dataset. The goal is to evaluate how sleep duration and sleep quality relate to stress, physical activity, daily steps, heart rate, BMI category, occupation, and sleep disorders.
The dataset was imported from a CSV file and cleaned in R using tidyverse tools. Variables were standardized, blood pressure was split into systolic and diastolic values, missing sleep-disorder values were recoded, and grouped variables were created for sleep, activity, and stress. These steps improved the quality and interpretability of the analysis.
The dashboard uses multiple chart types, including bar charts, scatterplots, boxplots, a heatmap, a correlation matrix, an interactive comparison chart, a network graph, and an interactive table. Together, these visuals answer a series of practical lifestyle questions using a data-driven approach.
flexdashboard,
ggplot2, plotly, DT,
GGally, igraph, ggraphThis graph shows how common short, borderline, recommended, and long sleep patterns are across the dataset.
This scatterplot evaluates whether people who sleep longer also tend to report better sleep quality.
These visualizations assess whether higher stress appears to be associated with worse sleep.
These charts evaluate whether more active lifestyles appear to coincide with better sleep outcomes.
This interactive chart compares stress and activity levels in a more compact way without clipping.
This chart explores whether some occupations systematically report more or less sleep than others.
These graphs examine whether BMI category and sleep-disorder status are linked with different sleep outcomes.
This matrix provides a concise overview of which numeric variables appear most strongly related.
This dashboard shows that inadequate sleep is present in the dataset, but extreme short sleep is relatively uncommon. The sleep-duration distribution indicates that 58.6% of respondents fall within the recommended 7–9 hour range, 39.8% fall in the borderline 6–6.9 hour range, and only 1.6% report short sleep below 6 hours. From a data interpretation standpoint, visualizing these proportions allows patterns to emerge that would be difficult to detect from raw tables alone (Wexler et al., 2017) . Substantively, this suggests that the primary concern is not severe sleep deprivation but a large group consistently falling slightly below optimal thresholds, which may still negatively impact health outcomes.
The relationship between sleep duration and sleep quality appears clearly positive. The upward trend observed in the scatterplot, reinforced by the fitted regression line, demonstrates that individuals who sleep longer tend to report better sleep quality. This aligns with the principle that visualizations enhance pattern recognition through pre-attentive processing, allowing users to quickly identify relationships (Cohen, n.d.) . While causality cannot be inferred, the consistency of the visual pattern strengthens confidence in the association.
Stress emerges as a strong determinant of sleep outcomes. The boxplot comparing stress groups shows a clear gradient, with median sleep duration decreasing from approximately 8.2 hours in the low-stress group to 6.2 hours in the high-stress group. This magnitude of difference indicates a substantial behavioral relationship. Effective visualization design is critical here, as grouping and positioning elements appropriately enhances interpretability and prevents misinterpretation (Few, 2008) . The accompanying stress-versus-sleep-quality visualization further supports this finding, indicating that higher stress levels correspond to poorer perceived sleep quality.
Physical activity shows a weaker but still meaningful association with sleep. The boxplot demonstrates that individuals in the high-activity group report slightly higher sleep quality than those in moderate and low activity groups. This suggests that activity may play a supportive role rather than a dominant one. The dashboard’s ability to integrate multiple variables reflects best practices in dashboard design, where multiple related metrics are presented cohesively to support decision-making (Juice Analytics, 2009) .
Daily steps also appear to have a modest positive relationship with sleep duration, although the effect is less pronounced than that of stress. This aligns with the broader interpretation that lifestyle factors collectively influence sleep, but some variables—particularly stress—have a stronger signal. Importantly, the clarity of these insights depends on avoiding misleading visual design practices, such as distortion or overemphasis, and maintaining graphical integrity (Tufte, 2001) .
The use of color and visual hierarchy across the dashboard further enhances interpretability. Strategic use of color helps guide attention to key patterns without overwhelming the viewer, consistent with best practices in visualization design (Cuffe, 2018). Poor use of color can obscure patterns, whereas thoughtful application improves comprehension and cognitive efficiency.
Finally, the inclusion of interactive elements (e.g., filtering by stress or activity levels) significantly enhances user engagement and analytical depth. Interactive dashboards allow users to explore relationships dynamically, supporting deeper insight generation through reactive data exploration (Grolemund, 2020) . This aligns with modern data visualization approaches that emphasize user-driven analysis rather than static reporting.
In conclusion, the dashboard effectively demonstrates that sleep outcomes are influenced by multiple interrelated factors, with stress emerging as the most significant predictor of both sleep duration and quality. Physical activity and daily movement contribute positively but to a lesser extent, suggesting that behavioral interventions targeting stress reduction may yield the most substantial improvements.
From a data visualization perspective, the dashboard successfully applies key principles of effective design. It minimizes unnecessary visual clutter, adheres to graphical integrity, and uses appropriate visual encodings to communicate relationships clearly (Tufte, 2001) . The organization and layout of the dashboard support user comprehension, aligning with established best practices in dashboard design (Few, 2008) .
Additionally, the use of interactive tools enhances the analytical value of the dashboard by allowing users to explore data relationships in real time. Such interactivity reflects modern trends in data visualization, where user engagement and flexibility are central to effective communication (Grolemund, 2020) .
Overall, this analysis highlights both substantive insights into sleep behavior and the importance of thoughtful visualization design. By combining sound analytical reasoning with effective visual communication, the dashboard provides a clear, accurate, and actionable understanding of the data.
Cohen, B. (n.d.). Graphic design and data visualization [Lecture slides]. Harrisburg University.
Cuffe, P. (2018). 8 rules for optimal use of color in data visualization. Towards Data Science. https://towardsdatascience.com/8-rules-for-optimal-use-of-color-in-data-visualization-b283ae1fc1e2/
Few, S. (2008). Dashboard design: Formatting and layout best practices. Perceptual Edge.
Grolemund, G. (2020). Shiny elements and reactive programming [Lecture slides]. Harrisburg University.
Juice Analytics. (2009). A guide to creating dashboards people love to use.
Tufte, E. R. (2001). The visual display of quantitative information (2nd ed.). Graphics Press.
Tufte, E. R. (2001). Envisioning information: Chartjunk and graphical integrity principles. Graphics Press.
Wexler, S., Shaffer, J., & Cotgreave, A. (2017). The big book of dashboards: Visualizing your data using real-world business scenarios. Wiley.
Cheng, J., Karambelkar, B., & Xie, Y. (2023). Leaflet: Create interactive web maps with the JavaScript “Leaflet” library (R package documentation). https://cran.r-project.org/web/packages/leaflet/leaflet.pdf
Social Network Analysis
Proxy Network of Similar Occupations
This network is based on similarity between occupations rather than actual person-to-person social ties. Occupations are connected when they have similar averages for sleep duration, sleep quality, stress, activity, and daily steps.
Row
Occupation Similarity Network