Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
Ssd2beatles
Last edited Jun 18, 2021
Created on Jun 18, 2021

This example uses the Vega-Lite API to visualize the classic Auto MPG dataset, plotting categorical origin on the x-axis and quantitative horsepower on the y-axis, with color encoding for weight and size encoding for miles per gallon. The code registers Vega, Vega-Lite, and the Vega-Lite API, then renders an interactive SVG scatterplot with a tooltip showing car names via the vega-tooltip Handler. Custom configuration in config.js adjusts font sizes and axis styling for readability, while getData.js loads the CSV using d3.csv.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes