Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

b0edde3caa0d46abbface6f07ce3d23b

Fork of Fork of Vega-Lite API Template

0 stars0🌍 Public
Sseitzfab
Last edited Jul 11, 2023
Created on Jul 11, 2023

This example visualizes the relationship between fuel efficiency (miles per gallon), horsepower, weight, and country of origin for cars from the UCI Auto MPG dataset, loaded via a CSV from a GitHub Gist. It uses a scatter plot with circles sized by weight and colored by origin, rendered through the Vega-Lite API and Vega-Lite’s declarative specification. The code registers Vega and Vega-Lite with `vl.register`, configures axes and tooltips via `vega-tooltip`, and sets the visualization to fit the browser window. Data is fetched asynchronously using `d3.csv`.

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.