Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Rreo440
Last edited Sep 20, 2020
Created on Sep 20, 2020
Forked from Stylized Bar Chart

This example generates a text-based report of cars from an embedded JSON dataset, filtering vehicles under $2,000 and formatting each entry with its year, make, model, and price. The code imports car data from `cars.js` and a `formatCar` utility, then uses `generateReport` to chain `filter`, `map`, and `join` operations. The resulting multiline message is written into the DOM via `document.getElementById` and rendered in an HTML `<pre>` element. Data is hardcoded in the source rather than loaded dynamically.

AI-generated description

Cars demo of d3 training by Curran Kelleher.

MIT Licensed

Similar vizzes