Skip to main content
100%

Average Sleep Efficiency vs. Gender

✓ Published1🌍 Public
MMartha Cash
Last edited Mar 15, 2023
Created on Mar 15, 2023

This visualization shows the average sleep efficiency for males and females as a two-bar bar chart. Using D3 v7, it computes the mean sleep efficiency from a CSV dataset loaded via `fetch`, then renders the results with `scaleBand` and `scaleLinear`. The bars are colored with `schemeDark2`, and the chart includes labeled axes created with `axisLeft` and `axisBottom`, along with custom axis labels.

AI-generated description

Bar chart as part of project momentum for the sleep efficiency dataset. Adapted from: https://d3-graph-gallery.com/graph/barplot_button_data_simple.html

Color scheme: https://observablehq.com/@d3/color-schemes

MIT Licensed

Similar vizzes