Skip to content

PYPTUG Monthly Meeting: Altair

Photo of Francois Dion
Hosted By
Francois D.
PYPTUG Monthly Meeting: Altair

Details

Come join PYPTUG at out next monthly meeting

Main talk:

Altair

presented by Martin DeWitt

bio:
Originally from Winston-Salem, Martin DeWitt is a former assistant professor of physics, who frequently used Python and IPython notebooks to teach both introductory and upper-level physics courses and labs. He is currently transitioning to a career in data science.

Abstract:
Altair is a statistical visualization Python library designed to facilitate the exploration of data by making it easy to generate interactive web-based visualizations. Using Pandas dataframes as data sources, Altair's API provides functionality to transform data (bin, sort, filter, and aggregate) and produce common graphs including histograms, line charts, scatter plots, and heatmaps. Graphs can be made interactive with features like panning, zooming, and filtering by mouse pointer selections. Most of the aspects of generating the visualizations -- axes, scales, legends, and interactive features -- are handled automatically, only requiring the user to employ Altair's concise declarative syntax to specify the connections between data columns in the dataframe and the various properties of the graph (axes, color, size, etc). With very few lines of code, you can generate rich, interactive, and portable web-based graphs.

In this presentation, I will first briefly introduce importing and viewing data using Pandas. I will then demonstrate some of the features of Altair for transforming data and creating both static and interactive graphs. We will work through a number of examples, step-by-step, from importing the data to a finalized graph. I intend for you to code along with me, so please be sure to bring your laptop.

For those who are interested in how the magic happens, Altair is based on Vega/Vega-Lite, which is a high-level grammar for producing interactive visualizations. "With Vega, visualizations are described in JSON, and generate interactive views using either HTML5 Canvas or SVG."(http://vega.github.io/) Altair works by taking specifications from the user through Python objects, generating the proper JSON code, and then using Vega to add a Canvas or SVG-based visualization to a web page. There are also renderers that allow Vega visualizations to be displayed in IPython and Jupyter notebooks.

Photo of PYthon Piedmont Triad User Group (PYPTUG) group
PYthon Piedmont Triad User Group (PYPTUG)
See more events
Manchester Hall Room 241
Wake Forest University · Winston Salem, NC