Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
Jjchen6912
Last edited Apr 26, 2022
Created on Apr 26, 2022

This example visualizes the Auto MPG dataset from the UCI Machine Learning Repository, plotting each car as a circle positioned by miles per gallon and horsepower, with color encoding for country of origin and size encoding for vehicle weight. The visualization is built using the Vega-Lite API, which is registered with Vega and configured to render as SVG. Data is fetched asynchronously via the `csv` import from d3, and the chart includes an opacity setting and tooltip support through the `vega-tooltip` Handler. The API calls include `markCircle`, `encode`, `fieldQ`, and `scale`, with custom axis styling from a separate config file.

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