Skip to main content
100%

Cars Module

✓ Published0🌍 Public
Ooliviawxye
Last edited Feb 27, 2021
Created on Feb 27, 2021
Forked from Hello VizHub

This example demonstrates a modular JavaScript application that fetches car data asynchronously and filters it to generate a text report. It shows how to structure code with ES6 modules, using `import` and `export` statements for local files and the D3 library via UNPKG. The app uses a `Promise` with `setTimeout` to simulate a 2-second data fetch, then applies `filter` and `map` operations to display cars priced under $2000 in an HTML `<pre>` element. The source data is embedded as a JSON string in `getCars.js`.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes