Skip to main content
100%

Loading Data 2

✓ Published1🌍 Public
AAbhi Yammanuru
Last edited Sep 7, 2025
Created on Sep 3, 2025
Forked from Loading Data 1

This example demonstrates loading a heart failure prediction dataset from a CSV file via a file input, then displaying its contents as a formatted JSON object. The visualization initially fetches `heart.csv` using D3's `fetch` and `csvParse` functions, converting numeric columns to numbers. Users can subsequently load their own CSV file, which is read using the `FileReader` API and parsed by `d3.csvParse`, updating the displayed state. The code relies on D3's `select`, `selectAll`, and `join` operations to render the data.

AI-generated description

This is my second dataset, with a heart faliure prediction dataset from kaggle.

https://www.kaggle.com/datasets/fedesoriano/heart-failure-prediction Ordinal Columns:

"Age": Numerical, 
"Sex": Categorical, 
"ChestPainType": Ordinal,
"RestingBP": Numerical, 
"Cholesterol": Numerical, 
"FastingBS": Numerical, 
"RestingECG": Categorical, 
"MaxHR": Numerical,
"ExerciseAngina": Categorical, 
"Oldpeak": Numerical, 
"ST_Slope": Categorical, 
"HeartDisease": Numerical
MIT Licensed

Similar vizzes