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)

06bafb9813104711b93d587465033caf

Fork of Vega-Lite API Template

0 stars0🌍 Public
GGunjan Paul
Last edited May 12, 2021
Created on May 12, 2021

This interactive scatter plot visualizes the relationship between miles per gallon and horsepower for various car models, with color encoded by region of origin and point size representing vehicle weight. Hovering reveals the car's name via tooltip. Built using the Vega-Lite API, the visualization programmatically constructs the chart through method chaining in `viz.js`, then renders it with Vega and Vega-Lite. Data is loaded asynchronously from a CSV in `getData.js` using `d3.csv`, and custom axis and label styling is applied from `config.js`.

AI-generated description

A visualization constructed using the vega-lite-api.

The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.