Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

895e751afcee495f94a9331132306ca5

Fork of Vega-Lite API Template

0 stars0🌍 Public
JJar-Jar-Blings
Last edited Dec 31, 2022
Created on Dec 31, 2022

This example shows a scatter plot of automobile characteristics from the auto-mpg dataset, plotting acceleration on the x-axis against horsepower on the y-axis, with color encoding car weight and tooltips revealing model names. The visualization is constructed programmatically using the Vega-Lite API through its JavaScript bindings, with `vl.markPoint()` defining the marks and `vl.x().fieldQ()`, `vl.y().fieldQ()`, and `vl.color().fieldQ()` specifying the encodings. Data is loaded asynchronously with `d3.csv()` from a GitHub gist, while Vega and Vega-Lite render the SVG output, supported by `vega-tooltip` for interactive hovering and a custom configuration that enlarges fonts and removes axis domains for readability.

AI-generated description

A visualization constructed using the vega-lite-api.