Visualizing using Vega

Vega is a beautiful visualization library provided by John Myles White. It is available as a registered Julia package, so it can be installed easily.

It is built on top of D3.js and uses JSON to create beautiful visualizations. It requires an Internet connection whenever we need to generate graphs as it doesn't store local copies of the JavaScript libraries needed.

Installation

To install Vega, use the following commands:

Pkg.add("Vega")
using Vega

Examples

Let's walk through various visualizations using Vega.

Scatterplot

Following are the arguments of a scatterplot:

  •  x and y: AbstractVector
  • Group: AbstractVector

Scatterplots are used to determine the correlation between two variables, that is, how one is affected by the other:

Get Julia for Data Science now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.