Skip to main content
100%

Sleep Efficiency vs. Age

✓ Published1🌍 Public
MMartha Cash
Last edited Apr 10, 2023
Created on Feb 26, 2023

This scatterplot shows the relationship between age and sleep efficiency, revealing a linear trend among younger individuals that disappears after about age 20. The visualization uses d3.scaleLinear for both axes and d3.scaleOrdinal with schemeCategory10 to color points by age. Data is loaded from a CSV file via d3.csvParse and processed with d3.flatRollup to aggregate observations before rendering circles with d3’s join pattern.

AI-generated description

This is a viz on the sleep efficiency dataset. The question this viz aims to answer the question is sleep efficiency and age correlated? We can see that there is a linear relationship until about age 20, and then afterward, there is no relationship.

MIT Licensed

Similar vizzes