Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

02859ef0dbc945ba8a1853bce65d5002

Vega-Lite API Template

6 stars411🌍 Public
CCurran Kelleher
Last edited Jan 4, 2024
Created on Sep 2, 2019

This example demonstrates a scatter plot of automotive engine displacement versus horsepower, where each point represents a vehicle and tooltips reveal its model name. Built with the Vega-Lite API, it registers Vega and Vega-Lite through the `vl.register()` function and loads data from a CSV file of auto-mpg statistics using `d3.csv`. The visualization uses `vl.markPoint()` with configurable opacity and axis styling, rendered as an SVG that scales to fit the browser window via `autosize({ type: 'fit' })`.

AI-generated description

A visualization constructed using the vega-lite-api.