Average Deep Sleep Duration vs. Age
This visualization shows the relationship between age and average deep sleep duration, using a scatter plot where each point represents the mean deep sleep hours for a given age group. The data is loaded from a remote CSV file and processed with d3.flatRollup to aggregate sleep metrics by age. The chart uses d3.scaleLinear for both axes, displays points with d3.schemeCategory10 colors, and includes labeled axes rendered via custom axis functions. A dropdown menu is implemented but only the deep sleep view is currently displayed.
AI-generated descriptionThis is a viz on the sleep efficiency dataset. The question this viz aims to answer the question how does age correlate with certain feautres of the dataset. This graph looks at age vs average deep sleep duration.
To do: add tool tip for hovering over data