Skip to content
Altair
Hidden Gem

Curated by Surfaced Editorial·Developer·2 min read
Share:

Altair is a declarative statistical visualization library for Python, developed by Jake VanderPlas and the Vega-Lite team. Its core feature allows users to build a wide range of statistical visualizations by declaring links between data columns and visual encoding channels like x-axis, y-axis, color, and size. It was primarily built for data scientists and researchers who want to create compelling and interactive visualizations with minimal code, focusing on the "what" rather than the "how." Users typically open Altair when they have a pandas DataFrame and need to quickly explore relationships or present findings, often within a Jupyter notebook or a Python script. It integrates seamlessly with pandas and is used primarily in Python environments.

Why It’s Useful

While Matplotlib and Seaborn are powerful for Python visualizations, Altair offers a declarative approach that often results in more concise and readable code for complex statistical plots, leveraging the grammar of graphics. For the data analyst who wants to quickly generate interactive scatter plots to identify correlations in their market data, Altair allows them to do so in just a few lines of code. For the academic researcher needing to visualize multi-dimensional survey results, Altair's layering and concatenation features enable sophisticated multi-panel plots. Altair is fully free and open-source. A less obvious feature is its ability to automatically generate interactive tooltips and selections without explicit coding, greatly enhancing data exploration. It's not more popular because its declarative paradigm can feel unfamiliar to those accustomed to imperative plotting libraries, and its reliance on Vega-Lite means debugging can sometimes involve understanding the underlying JSON. Altair benefits from active development by its core team and the broader Python data science community, with frequent updates.

Enjoyed this? Get five picks like this every morning.

Free daily newsletter — zero spam, unsubscribe anytime.