Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API Template for practise

Public visualization

Vega-Lite API Template for practise

0 stars1🌍 Public
RRuanzhenglin
Last edited Apr 15, 2021
Created on Apr 15, 2021

This example demonstrates how to build interactive scatter plots using the Vega-Lite API in a D3.js context. The visualization displays automobile data from the UCI Machine Learning Repository’s Auto MPG dataset, plotting horsepower against the car’s origin with tooltips showing vehicle names. The code uses the `vega-lite-api` library to construct the chart programmatically, registering it with Vega and Vega-Lite, and applies a custom configuration for axis styling and fonts. Data loading relies on `d3.csv` to fetch the dataset, while Vega Tooltip handles interactive hover information.

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.

Comments

Sign in to join the discussion.

MIT Licensed