Skip to main content
100%

Viz with Vega

✓ Published0🌍 Public
SStarkerRegen
Last edited Jan 19, 2022
Created on Jan 19, 2022

This example uses the Vega-Lite API to render a scatter plot of automobile data from the UCI Machine Learning Repository’s Auto MPG dataset. It maps miles per gallon on the x-axis, horsepower on the y-axis, color to country of origin, and size to vehicle weight, with tooltips showing model names. The visualization is built programmatically via `vl.markCircle`, `vl.x().fieldQ()`, and related encodings, then rendered with Vega-Lite’s API and a custom `config` for styling. Data loading relies on d3’s `csv` function, while the final output uses Vega’s SVG renderer with an interactive tooltip handler.

AI-generated description

A visualization constructed using the vega-lite-api.

The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.

MIT Licensed

Similar vizzes