Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
Jjames.haarbauer@dunya-analytics.com
Last edited Jun 17, 2024
Created on Jun 17, 2024

This visualization displays a scatter plot of automotive data from the UCI Auto MPG data set, mapping fuel efficiency (mpg) against horsepower. Each circular mark is colored by country of origin and sized by vehicle weight, with tooltips revealing car model names. The chart demonstrates the Vega-Lite API (vl) for D3, where the programmatic specification defines encoding channels like `vl.x().fieldQ('mpg')` and `vl.color().fieldN('origin')`. The code registers Vega, Vega-Lite, and the Vega-Lite API, then reads CSV data via `d3.csv` to render interactive SVG output.

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