Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

0222ec87c82a4ee1be91adf8297614c0

Vega-Lite API Template

0 stars8🌍 Public
CCurran Kelleher
Last edited Sep 4, 2019
Created on Sep 2, 2019

This example renders a scatterplot of automobile data using the Vega-Lite API, with each circle representing a car model positioned by its country of origin and horsepower. The visualization shows overlapping points with low opacity to reveal density patterns. It loads data from a CSV file using d3.csv, constructs the mark and encoding specifications through vl.markCircle and vl.encode, then renders the final SVG using Vega charting libraries bundled with Vega-Tooltip. The code demonstrates a workflow that builds a Vega-Lite specification programmatically rather than writing JSON directly, minimizing boilerplate while retaining full expressiveness.

AI-generated description

A visualization constructed using the vega-lite-api.