Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API Template

Public visualization

Vega-Lite API Template

0 stars0🌍 Public
SShuyu Zheng
Last edited Dec 23, 2020
Created on Dec 23, 2020

This example uses the Vega-Lite API with D3 to render a bubble chart of religious populations by country, sourced from the UCI Auto MPG dataset via a Gist. The visualization encodes country on the x-axis (sorted by descending population), religion on the y-axis, and population size as the bubble area, with tooltips for exact values. Code loads data via `d3.csv`, configures axes and styles through a `config` object, and renders an SVG using `vl.markCircle` with `vl.encode`, all orchestrated through `vega-lite-api` and `vega-tooltip`.

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