Skip to main content
100%

Sleep efficiency data

✓ Published1🌍 Public
MMartha Cash
Last edited Jan 23, 2023
Created on Jan 23, 2023

This example visualizes sleep efficiency data sourced from Kaggle, showing records of sleep duration, REM percentage, deep sleep, and related features. The code fetches a CSV file and parses it with `csvParse`, then displays the raw parsed data as formatted JSON text in a `<pre>` element. Using d3 v7’s `select` and data joins, the visualization updates whenever the state changes, initially setting a loading flag before rendering the fetched dataset. The implementation relies on d3’s `fetch` and `csvParse` APIs to load and structure the tabular data.

AI-generated description

Sleep efficency data sourced from: https://www.kaggle.com/datasets/equilibriumm/sleep-efficiency?select=Sleep_Efficiency.csv

Features include: Sex, deep sleep percentage, wake time, sleep time, REM sleep percentage, sleep duration, etc.

MIT Licensed

Similar vizzes