Fork of Loading Data - Lifestyle Health
This visualization demonstrates how to load and parse a CSV dataset using D3 v7, displaying the raw parsed data as JSON in a `<pre>` element. The example uses `csvParse` to convert survey data about lifestyle and health metrics, explicitly coercing numeric fields with the unary `+` operator. A state management pattern handles asynchronous data loading, showing a 'LOADING' placeholder before the fetched dataset appears. The code relies on `select` and `join` to render the data, sourced from a Kaggle dataset on disease risk from daily habits.
AI-generated descriptionThis data set contains informations about an individuals lifestyle and health. I will definitely be reducing the number of attributes in the future. https://www.kaggle.com/datasets/mahdimashayekhi/disease-risk-from-daily-habits Data attributes: Quantitative: weight height bmi blood pressure ...
Categorical: gender job exercise_type ...
Ordinal: device usage sunlight exposure caffine intake ...