Skip to main content
100%

Vega-Lite API Template Practice

✓ Published1🌍 Public
JJames Rhodes
Last edited Feb 13, 2022
Created on Feb 13, 2022

This example demonstrates how to use the Vega-Lite API to create an interactive scatter plot of automotive data, mapping origin, horsepower, weight, and acceleration to visual channels. The visualization renders as an SVG. The code imports data from a CSV file via `d3.csv` and constructs the chart using `vega-lite-api` methods such as `markCircle` and `encode`, with `vega` and `vega-lite` registered for chart compilation. Tooltips are added through the `vega-tooltip` library, and the chart is configured to fit the browser window.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes