Skip to main content
100%

Vega-Lite API Template

✓ Published2🌍 Public
MMilena Belianovich Holtman
Last edited Oct 12, 2022
Created on Oct 12, 2022

This example demonstrates a scatter plot visualization of automotive data, showing the relationship between vehicle weight, horsepower, and fuel efficiency (mpg). The visualization uses the Vega-Lite API to construct a circle mark with position encoding for weight and horsepower, while color and size encode weight and mpg respectively. It pulls data from a CSV file using d3's `csv` method, and renders the chart as an SVG with a tooltip handler. The code registers Vega-Lite and uses its high-level declarative syntax to define the plot, with custom configuration for axis styling and dark text labels.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes