🌍 Public
Viewing a saved revision (read-only)
0c80ee64fbb54a1c813ea84fb8b847a0
Sports Car Prices Dataset
This example loads a sports car dataset and displays its raw contents as a formatted JSON preview. The visualization fetches a CSV file containing 1,000 rows of car specifications (make, model, year, engine size, horsepower, torque, 0-60 time, and price) using the Fetch API and parses it with `d3.csvParse`. The parsed data is stored in a state object managed through a custom `setState` function, while D3's `select` and `join` operations render the data in a `<pre>` element. The page updates reactively whenever the state changes, initially showing "LOADING" before the data arrives.
AI-generated description