Skip to main content
100%

Vega-Lite API Template

✓ Published0🌍 Public
AAnthonyAl-Rifai
Last edited Feb 20, 2023
Created on Feb 17, 2023

This example shows a scatterplot of automotive data, plotting horsepower against weight while encoding country of origin by color and miles per gallon by point size. The visualization is built using the Vega-Lite API, which registers with Vega and Vega-Lite to render an SVG view. Data is loaded asynchronously from a CSV file using d3.csv, and the chart is configured with custom axis styles and tooltips via vega-tooltip. The vega-lite-api’s method chaining defines the encoding and mark specifications.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes