Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Sleep efficiency data

Public visualization

Viewing a saved revision (read-only)

d7a289959e074f1d97f522ee315f3a35

Sleep efficiency data

0 stars1🌍 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.