Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

3d0a3de1767542ccb5fdfd24b0d53faa

Fork of Vega-Lite API Template

0 stars0🌍 Public
Mmaker57sk
Last edited Feb 26, 2021
Created on Feb 25, 2021

This example uses the Vega-Lite API to render an interactive scatter plot of the Auto MPG dataset from the UCI Machine Learning Repository, displaying vehicle weight against horsepower with points colored by origin and sized by weight. A tooltip reveals the car’s name on hover. The code builds the visualization declaratively via `vl.markCircle`, `vl.encode`, and field mappings, then registers Vega-Lite with vega and vega-lite-api, using d3’s `csv` loader for data retrieval and custom configuration for styling axes and labels.

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.