Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API

Public visualization

Viewing a saved revision (read-only)

dccd7722f11e467fa45b6b7b344b423c

Vega-Lite API

0 stars0🌍 Public
DDavid
Last edited Mar 23, 2021
Created on Mar 22, 2021

This visualization shows the relationship between miles per gallon and horsepower for cars from the UCI Auto MPG dataset, with points colored by origin and sized by horsepower. It uses the Vega-Lite API to construct a scatter plot with circle marks, encoding tooltips for car names. The code registers vega, vega-lite, and vega-lite-api with a tooltip handler, loads data via d3.csv, and renders an SVG chart that fits the window size. Custom axis and label styling are applied through a configuration object.

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.