Skip to content

Vega-Lite

Vega-Lite is a language for describing charts in JSON: you name the data, the mark and which column goes on each axis, and a renderer draws it. Altair writes Vega-Lite for you.

Select any words here to ask your Maestro about them.

A small spec:

JSON
{  "mark": "point",  "encoding": {    "x": {"field": "gdp_per_capita", "type": "quantitative"},    "y": {"field": "life_expectancy", "type": "quantitative"}  }}

The chart is described rather than drawn step by step, so the same spec renders in a notebook, on a web page or on a course page. chart.to_json() shows the Vega-Lite behind any Altair chart.

Ask your Maestro about Vega-Lite

It answers from a free course page that uses this word, the way it answers while you study.

Example

You: What does "Vega-Lite" mean, in plain words?

Your Maestro: I'll explain it with a case of yours: it sticks better than a definition. Want to see the Vega-Lite behind one of your charts?

Asking about: Answers from the page "How do I review a misleading dashboard? Fix one with four questions"

Only this browser keeps what you ask here. How it works

In Maestro's courses

Learn more

  • JSON

    JSON is a text format for structured data: labels and values inside curly braces, lists inside square brackets. Programs use it to pass data to each other.

  • Altair

    Altair (Vega-Altair) is a Python package for making charts by describing them: you say which column goes on each axis, color or size, and it writes the Vega-Lite that draws the chart.

The whole glossary