Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
Sstefanpullen
Last edited Dec 16, 2021
Created on Dec 16, 2021

This example visualizes the relationship between automobile fuel efficiency (mpg), vehicle weight, and horsepower, colored by country of origin, using a scatter plot of circles with tooltips. It is built with the Vega-Lite API for D3.js, which constructs a specification rendered via Vega and Vega-Lite. The visualization loads an auto-mpg CSV dataset from a GitHub gist, sets circle size and opacity via `markCircle`, and encodes fields using methods like `.fieldQ('mpg')` and `.fieldN('origin')`. The tooltip uses the `vega-tooltip` handler, and the chart resizes to fit the window.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes