Encodings
Explore how Altair uses encoding channels to map data to visual elements like position, color, and tooltips. Understand how to apply these concepts to create clear, focused charts such as a multi-line comparison of internet speeds among countries.
We'll cover the following...
Altair uses encodings to specify where to represent data. To implement an encoding, Altair defines the concept of an encoding channel. Encoding channels are the building blocks of a visualization. Altair uses encoding channels to translate data from a raw representation in a dataset, such as a DataFrame, to the final visualization. The encoding process dictates how that data appears in the chart based on the selected channel type.
Main types of channels
Altair defines the following main types of channels:
Position: This defines the position of data in the chart.
Mark property: This ...