Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
JJar-Jar-Blings
Last edited Dec 31, 2022
Created on Dec 31, 2022

This example shows a scatter plot of automobile characteristics from the auto-mpg dataset, plotting acceleration on the x-axis against horsepower on the y-axis, with color encoding car weight and tooltips revealing model names. The visualization is constructed programmatically using the Vega-Lite API through its JavaScript bindings, with `vl.markPoint()` defining the marks and `vl.x().fieldQ()`, `vl.y().fieldQ()`, and `vl.color().fieldQ()` specifying the encodings. Data is loaded asynchronously with `d3.csv()` from a GitHub gist, while Vega and Vega-Lite render the SVG output, supported by `vega-tooltip` for interactive hovering and a custom configuration that enlarges fonts and removes axis domains for readability.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes