Skip to main content
100%

Fork of Vega-Lite API Template I

✓ Published0🌍 Public
Aazad-ali786
Last edited Oct 28, 2021
Created on Oct 28, 2021

This example visualizes the relationship between fuel efficiency (mpg), horsepower, and weight for various car models, with origin mapped to color and point size reflecting weight. It uses the Vega-Lite API to construct a scatter plot, pulling data from the UCI Machine Learning Repository's Auto MPG dataset. The visualization is rendered via d3.v5, leveraging Vega-Lite's declarative specification through the `vl` API, with an interactive tooltip displaying car names. The code imports vega, vega-lite, and vega-tooltip, and customizes axis styling and font sizes via a config 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.

MIT Licensed

Similar vizzes