Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Viewing a saved revision (read-only)

eb9c982223584fc4aad939c925d2d41a

Cars Report

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