Skip to content
Julia wrapper for the Voyager data exploration tool
Branch: master
Clone or download
Latest commit 16befd6 Feb 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Add docs template Feb 23, 2019
src Fix a bug in the JSON conversion Sep 15, 2018
test Update to julia 0.7/1.0 Sep 4, 2018
.codecov.yml VegaVoyager.jl generated files. Dec 30, 2017
.gitattributes Rename .gitattributes May 16, 2018
.gitignore Update .gitignore Dec 31, 2017
.travis.yml Add docs template Feb 23, 2019
LICENSE.md Update to julia 0.7/1.0 Sep 4, 2018
NEWS.md Update NEWS Sep 15, 2018
README.md
REQUIRE Update to julia 0.7/1.0 Sep 4, 2018
appveyor.yml Update CI config for julia 1.1 Jan 3, 2019

README.md

DataVoyager

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Build Status Build status DataVoyager codecov.io

Overview

This package provides julia integration for the Voyager data exploration tool.

Getting Started

DataVoyager.jl can be used for data exploration. It can help you visualize and understand any data that is in a tabular format.

You can install the package at the Pkg REPL-mode with:

(v1.0) pkg> add DataVoyager

Exploring data

You create a new voyager window by calling Voyager:

using DataVoyager

v = Voyager()

By itself this is not very useful, the next step is to load some data into voyager. Lets assume your data is in a DataFrame:

using DataFrames, DataVoyager

data = DataFrame(a=rand(100), b=randn(100))

v = Voyager(data)

You can also use the pipe to load data into voyager:

using DataFrames, DataVoyager

data = DataFrame(a=rand(100), b=randn(100))

v = data |> Voyager()

With a more interesting data source

using VegaDatasets, DataVoyager

v = dataset("cars") |> Voyager()

You can load any IterableTables.jl source into voyager, i.e. not just DataFrames. For example, you can load some data from a CSV file with CSVFiles.jl, filter them with Query.jl and then visualize the result with voyager:

using FileIO, CSVFiles, Query, DataVoyager

v = load("data.csv") |> @filter(_.age>30) |> Voyager()

In this example the data is streamed directly into voyager and at no point is any DataFrame allocated.

Extracting plots

You can also access a plot that you have created in the voyager UI from julia, for example to save the plot to disc.

You can access the currently active plot in a given voyager window v with the brackets syntax:

using VegaDatasets, DataVoyager, VegaLite

v = dataset("cars") |> Voyager()

plot1 = v[]

At this point plot1 will hold a standard VegaLite.jl plot object. You can use the normal VegaLite.jl functions to display such a plot, or save it to disc:

display(plot1)

plot1 |> save("figure1.pdf")

A useful pattern here is to save the plot as a vega-lite JSON file to disc, without the data:

using VegaDatasets, DataVoyager, VegaLite

v = dataset("cars") |> Voyager()

# Now create the plot in the UI

v[] |> save("figure1.vegalite")

At a later point you can then load this figure specification again, but pipe new data into it:

using VegaLite, VegaDatasets

dataset("cars") |> load("figure1.vegalite")
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.