Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Vega-Lite API Template

Public visualization

Fork of Vega-Lite API Template

0 stars0🌍 Public
HHunDeTroie
Last edited Dec 16, 2021
Created on Dec 16, 2021

This example visualizes the relationship between fuel efficiency, acceleration, weight, and country of origin for cars from the UCI Auto MPG dataset. The code constructs a scatter plot using the Vega-Lite API, plotting `mpg` against `acceleration`, with color encoding origin and size encoding weight. It leverages `vl.register` to integrate Vega-Lite, and `vl.markCircle` with `.encode` for the visual marks. Data is loaded asynchronously via `d3.csv`, and the chart is rendered as an SVG, configured with custom axis and label styling.

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