JuliaCon 2020 (times are in UTC)

Interactive data visualizations with AlgebraOfGraphics
07-31, 19:10–19:20 (UTC), Green Track

The Makie library supports interactive visualizations in 2D or 3D, both native and web-based. AlgebraOfGraphics.jl adds support for statistical visualizations in two ways. It implements visualizations for common analyses (frequency table, kernel density, linear and non-linear regressions...), and it offers a set of custom types that allow to express how the data should be grouped, styled, and analyzed. This unified syntax layer simplifies the creation of UIs for interactive data analysis.


In this talk, I will present Algebra of Graphics, a novel take on the Grammar of Graphics (GoG) approach to plotting.

In GoG (available in Julia thanks to for example Gadfly.jl or VegaLite.jl), a tabular dataset is used to inform how a plot should look like. Different columns correspond to different plot attributes, according to different scales. On top of that, columns can be transformed using "statistics", which in turn will inform what plot function to use (e.g. bar plot or scatter plot).

On the other hand, in the recipe framework, implemented in the Plots.jl and Makie.jl packages, custom types are recursively transformed into simpler types, until a suitable visualization is found.

I will show how AlgebraOfGraphics.jl (the successor of StatsMakie.jl) attempts to bridge the gap between the two approaches, as it implements a version of Grammar of Graphics based on custom types and multiple dispatch. In particular, a combination of custom types (Style and Analysis) can be used to express how data should be grouped, styled, and analyzed (see examples).
These basic types can then be combined using the + and * operators.

The interface is declarative. The "translation" from data columns to plot attributes relies on a default theme, which can be customized, thus changing the "look" of all visualization consistently.

As the library is implemented in pure Julia, users are not limited to pre-built analyses but can implement their own, and they will automatically be integrated in the framework. This GoG-inspired framework, can then be combined with Makie's plot functions, as well as with the plot functions provided in StatsMakie.jl (such as boxplot or violin plot) or in other external packages.

An added benefit of the GoG approach is that many different plot commands can be expressed with a uniform syntax. This greatly simplifies the creation of interactive user interfaces for data analysis, where the user can select (from e.g. dropdown menus) what columns of a dataset to use, what analysis to run, and how to group and style the data. I will show a simple UI to create visualizations of a tabular dataset interactively.

I am a PhD student in Neuroscience at the Champalimaud Foundation (Lisbon, Portugal). During my PhD, I have mostly worked on behavioral task design, and computational models of behavior of biological and artificial agents. I have been using julia for a few years for my research, and have contributed to several julia packages for data analysis and visualization.