Altair

David Landup
Dan Nelson

Altair is a Python library engineered to facilitate the visualization of statistical data. What sets Altair apart from other visualization libraries is that it is based on the Vega and Vega-Lite standards, which are a type of grammar related to visualizations.

The result is that you can simply describe what you want a plot to look like using the JSON format and Altair will render the corresponding visualization. This makes creating plots in Altair quite intuitive and easy to grasp.

In the coming lesson, we will cover the basic functions of Altair’s declarative API, examine some methods of customizing your plots in Altair, and look at some examples of the different plots you can create with Altair. Please be aware that at the time of this writing much of Altair is still under development.

The course will be updated with future Altair releases accordingly.

Altair’s Declarative API

The idea behind Altair is that it’s a declarative library. In order to create visualizations, all you need to do is declare which type of visualization you’d like and declare a few arguments that tell Altair to create the visualization with certain desired features.

When you declare a plot in Altair, you typically chain together your declarations, starting with the all-purpose Chart object and then declaring what type of chart you want, followed by how the data should be encoded on that chart.

Start course to continue
Lessson 7/12
You must first start the course before tracking progress.
Mark completed

© 2013-2024 Stack Abuse. All rights reserved.

AboutDisclosurePrivacyTerms