Vega and Vega-Lite
Explore how Vega and Vega-Lite define visualizations through JSON specifications, including marks, scales, axes, and legends. Understand their roles in creating interactive charts and how Altair builds on Vega-Lite for Python-based data storytelling.
We'll cover the following...
Vega is a visualization grammar that describes the visual appearance and interactive behavior of a chart. To create a design, we’ll write the code in JSON format, and Vega will generate a web-based view using HTML5 Canvas or SVG.
We define a Vega visualization through a specification. A specification is composed of properties and definitions for the data to visualize. The following piece of code shows a basic example of a Vega specification.
Vega supports the following top-level properties:
$schema: This is the URL to the Vega schema.description: This is a textual description of the visualization.width,height: This is the width and height in pixels of the data ...