Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
PPeter Williams
Last edited Oct 28, 2021
Created on Oct 28, 2021

This example visualizes the relationship between vehicle displacement, horsepower, weight, and model year in the classic Auto MPG dataset. A scatter plot of displacement against horsepower uses circle size to encode weight and color to distinguish model years, with hovering revealing each car’s name. Built with the Vega-Lite API, it composes marks and encodings programmatically via `vl.markCircle` and `vl.encode`, then renders through Vega and Vega-Lite with a custom tooltip handler. The data loads asynchronously from a gist CSV using d3’s `csv` function, and the chart fills the browser window with a customized dark-on-light theme.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes