Skip to main content
100%

Vega light API demo

✓ Published0🌍 Public
Aarunkumarv1530@gmail.com
Last edited May 22, 2024
Created on May 22, 2024

This example demonstrates a scatter plot of automotive data from the UCI Machine Learning Repository’s Auto MPG dataset, visualizing fuel efficiency (mpg) against horsepower, with point color encoding country of origin, size encoding vehicle weight, and tooltips showing model names. Built with the Vega-Lite API, the visualization leverages `vl.markCircle`, `vl.x()`, `vl.y()`, and `vl.encode()` to define the specification programmatically, while d3.csv loads the remote data. The chart is rendered as an SVG and includes custom axis styling and tooltip handling via vega-tooltip.

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