An interactive, browser-based graphing library for Python that builds charts from a declarative figure API built on plotly.js.
vega/altair
Declarative Python visualization library that builds interactive charts on the Vega-Lite JSON specification with a concise API.
Open-source alternative to:Tableau
- Stars
- 10,513
- Forks
- 887
- Open issues
- 167
- Last commit
- 2 days ago
What is it?
Vega-Altair is a declarative statistical visualization library for Python. You describe a chart by mapping data fields to visual channels such as x, y and color, and the library generates the underlying Vega-Lite JSON specification. The API is type-checked against that specification, so invalid chart definitions are caught early.
Beyond static plots, charts can include interactions defined in the same grammar, such as selections that filter or recolor linked views. Charts display inline in JupyterLab, Jupyter Notebook, Visual Studio Code and nbviewer, and can be exported as PNG or SVG images, stand-alone HTML pages, or JSON files.
Installation is available through pip or conda-forge. The project provides a documentation site and tutorial notebooks that can be run in Binder or Colab.
Key features
- 01Declarative Python API for mapping data fields to visual channels.
- 02Generated API is type-checked against the Vega-Lite specification.
- 03Supports interactive selections that link and filter multiple charts.
- 04Displays inline in JupyterLab, Jupyter Notebook, VS Code and nbviewer.
- 05Exports to PNG, SVG, stand-alone HTML and JSON.
Use cases
- Exploratory data analysis in Jupyter notebooks with pandas DataFrames.
- Building linked, brushable views that filter one chart from another.
- Generating shareable HTML or image charts from Python analysis scripts.
Quick start
- 1
Install Vega-Altair with pip
pip install altair - 2
Or install with conda from conda-forge
conda install altair -c conda-forge - 3
Import altair and create a chart from the built-in cars dataset
Things to know
- Depends on Vega-Lite rendering, so some output formats such as PNG or SVG export may need extra setup.
In collections
Topics
FAQ
- What is altair?
- Declarative Python visualization library that builds interactive charts on the Vega-Lite JSON specification with a concise API. Vega-Altair is a declarative statistical visualization library for Python. You describe a chart by mapping data fields to visual channels such as x, y and color, and the library generates the underlying Vega-Lite JSON specification. The API is type-checked against that specification, so invalid chart definitions are caught early.
- Is altair free to use? What license does it have?
- altair is open source under the BSD-3-Clause license. Check the license terms before using it in commercial products.
- Is altair still maintained?
- Actively maintained. The last commit to altair was on Nov 6, 2026.
- What can I use altair for?
- Exploratory data analysis in Jupyter notebooks with pandas DataFrames. Building linked, brushable views that filter one chart from another. Generating shareable HTML or image charts from Python analysis scripts.
- How do I install altair?
- Install Vega-Altair with pip: pip install altair Or install with conda from conda-forge: conda install altair -c conda-forge Import altair and create a chart from the built-in cars dataset
- Where can I get altair?
- The source code and installation instructions are on GitHub: https://github.com/vega/altair
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A high-level JSON grammar for declarative interactive charts that compiles to complete Vega specifications.
A declarative JSON grammar for building interactive data visualizations that render to HTML5 Canvas or SVG.
A free, open-source JavaScript library for binding data to SVG, Canvas and HTML to build custom, data-driven visualizations.
Python library for building interactive data visualizations, plots and dashboards that render in modern web browsers.
A declarative engine that generates and renders SVG infographics from a text syntax, designed for AI-driven generation and streaming output.