Skip to main content
100%

Aditya - Vega-Lite API Template

✓ Published0🌍 Public
AAditya Bhattacharya
Last edited Apr 22, 2022
Created on Mar 30, 2022

This visualization displays the relationship between fuel efficiency (mpg), horsepower, weight, and country of origin for automobiles, using circles sized by weight and colored by origin. The code uses the Vega-Lite API to construct the chart declaratively, registering it with Vega and Vega-Lite, and renders output as SVG in the browser. Data is loaded asynchronously via D3’s `csv` function from the Auto MPG dataset hosted on GitHub Gist. D3 v5, Vega, Vega-Lite, and vega-tooltip are all loaded separately, with chart appearance customized through a configuration object that adjusts axis and label styling.

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