Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

39fcbd06a1c94179a74a5c8bc04cbe8f

Vega-Lite API Template

0 stars1🌍 Public
CCyc-Evelyn
Last edited Oct 11, 2020
Created on Oct 11, 2020

This example uses the Vega-Lite API to render a scatter plot of the Auto MPG dataset from the UCI Machine Learning Repository. The plot maps vehicle weight to the x-axis and horsepower to the y-axis, with point size representing miles per gallon and color encoding weight. The visualization loads data via `d3.csv` and uses the `vl.markCircle` and `vl.encode` API to define the marks and channels. Vega-Lite and Vega are registered through the `vl.register` function, and interactivity is added with `vega-tooltip`.

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. //ep18