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)

b00a0b4604d84231b10a1cccbd463556

Fork of Vega-Lite API Template

0 stars0🌍 Public
AAnu Wat
Last edited Oct 17, 2021
Created on Oct 17, 2021

This example visualizes the relationship between fuel efficiency (mpg) and horsepower for classic automobiles, with points colored by country of origin and tooltips revealing model names. It uses the Vega-Lite API (`vl.markCircle`, `vl.x().fieldQ()`, `vl.color().fieldN()`) to declaratively encode the data, with rendering handled by Vega and Vega-Lite. The CSV dataset is fetched via d3’s `csv` function, and the visualization adapts to the browser window using `.width()` and `.height()` with autofit behavior.

AI-generated description

A visualization constructed using the vega-lite-api.