Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
Rramdev2021
Last edited Feb 10, 2022
Created on Feb 10, 2022

This example uses the Vega-Lite API to render a scatter plot of Auto MPG data from the UCI Machine Learning Repository, loaded via `d3.csv`. The visualization encodes miles per gallon (mpg) on the x-axis and horsepower on the y-axis as quantitative fields, with color mapped to the categorical origin of each vehicle. Point size represents weight, and tooltips display model names using `vl.tooltip()`. The chart is built programmatically in `viz.js` and rendered with an SVG view, customized through a shared `config.js` for improved label and title readability.

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