🌍 Public
Viewing a saved revision (read-only)
91ba4d2878e74a56ae0a0374944e380f
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.