🌍 Public
Viewing a saved revision (read-only)
b3e3ae21425e4aae9123d9c0438422e0
Vega-Lite API Template Practice
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 descriptionA visualization constructed using the vega-lite-api.