Viewing a saved revision (read-only)
fc5c93c03f8e47acbf08ab99a135b81a
Vega light API demo
This example demonstrates a scatter plot where each circle represents a data point, with its position mapped to the `jan` and `year_val` fields and color encoding the `districtid` category. The Vega Lite API, using `vl.markCircle` and `vl.encode`, builds the visualization declaratively from CSV data fetched via `d3.csv`. Rendered as an SVG through the Vega rendering engine, the plot includes tooltips for `state`, `districtid`, `year_val`, and `jan` values, and employs a custom configuration for styled axes and labels.
AI-generated descriptionA 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.