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)

ab9367e0526d4d6b87f333db16bfecd1

Fork of Vega-Lite API Template

0 stars0🌍 Public
Sseanmdalrymple@protonmail.com
Last edited Feb 10, 2025
Created on Feb 10, 2025

This example visualizes the relationship between car origin and horsepower using a scatter plot. It renders points from the auto-mpg dataset, with each point colored by origin and positioned by horsepower. The visualization is built with the Vega-Lite API, which constructs a Vega-Lite specification that is then rendered by Vega. Data is loaded asynchronously via the d3.csv function, and tooltips display car names on hover. The code customizes the chart’s appearance through a config object, setting fonts and axis styles, and uses a dark color for text.

AI-generated description

A visualization constructed using the vega-lite-api.