What is Altair?
An introduction to Altair and what is it built on. Placeholder post for the upcoming posts on making professional graphs like NYT.
Lets start with Vega.
What is Vega?
Vega is a visualization grammar, a declarative language for creating, saving, and sharing interactive visualization designs. With Vega, you can describe the visual appearance and interactive behavior of a visualization in a JSON format, and generate web-based views using Canvas or SVG.
To be clear, Vega is not intended as a “replacement” for D3. D3 is intentionally a lower-level library. During the early design of D3, we even referred to it as a “visualization kernel” rather than a “toolkit” or “framework”. In addition to custom design, D3 is intended as a supporting layer for higher-level visualization tools. Vega is one such tool, and Vega uses D3 heavily within its implementation.
Vega provides a higher-level visualization specification language on top of D3. By design, D3 will maintain an “expressivity advantage” and in some cases will be better suited for novel design ideas. On the other hand, we intend Vega to be convenient for a wide range of common yet customizable visualizations.
Vega-Lite is used by some big players -
Altair
In short, Altair exposes a Python API for building statistical visualizations that follows Vega-Lite syntax.
Altair is a declarative statistical visualization library for Python, based on Vega and Vega-Lite. With Altair, you can spend more time understanding your data and its meaning.
Altair’s API is simple, friendly and consistent and built on top of the powerful Vega-Lite visualization grammar. This elegant simplicity produces beautiful and effective visualizations with a minimal amount of code.
I do not intend to teach you how to use Altair or Vega Lite. You can do that on your own using the following excellent resources -
- Conference Talk by Jake VanderPlas