The altair Package
Prerequisite: The
pandas
PackageAltair is a declarative statistical visualization library for Python ... with a minimal amount of code. - Altair website
Reference
Installation
First install the package using Pip, if necessary:
Usage
To display a new chart, construct it by specifying certain chart configuration options, including the type of chart and the data to visualize.
Example using provided dataset:
NOTE: once you "serve" the chart, you'll see your terminal window get taken over by running a web server. You'll be able to view your chart in a web browser, but when you're done you'll need to quit the web server by pressing control+c in your terminal. After doing so you will regain the ability to type commands in your terminal window.
Example using custom dataset:
NOTE: it appears altair requires you to specify the data as a Pandas DataFrame. If you'd rather not use Pandas, consider choosing a different charting library.
Consult the documentation and examples for a variety of chart customization options.
Last updated