Vega.jl

A Julia package for generating visualizations in Vega

Getting Started
Visualization Primitives
Creating A Visualization From Scratch

Pre-defined Visualizations

Area Plot
Aster Plot
Bar Plot
Box Plot
Bubble Chart
Choropleth
Dot Plot
Grouped Bar
Heatmap
Horizon
Histogram
Joint Plot
Line Plot
Pie/Donut Chart
Population Chart
Punchcard
Ribbon Plot
Rug Plot
Scatter Plot
Stem-and-Leaf Plot
Stream Plot
Waterfall
Word Cloud

Interactive Visualization

Interact.jl and Vega in Jupyter Notebooks
Creating Interactive Sites Using Escher and Vega

Visualization Mutating Functions

colorscheme!
General Visualization Properties
hline! / vline!
hover!
jitter!
legend!
stroke!
text!
title!
xlab! / ylab!
xlim! / ylim!

View the Project on GitHubjohnmyleswhite/Vega.jl

Choropleth

Function Keywords:

x::AbstractVector
y::AbstractVector
entity::Symbol = :uscounties

U.S. Counties

The input for the X array are 5-digit U.S. county-level FIPS codes, not zip codes. The two are not interchangeable. Additionally, you need to account for missing FIPS codes manually at the moment, this function will not plot shapes if you do not provide a FIPS code value. This will likely be remedied in a future release.

using Vega, DataFrames
df = readtable(Pkg.dir("Vega", "vega-datasets/unemployment.tsv"))

v = choropleth(x = df[:id], y = df[:rate])

U.S. States

The input for the X array are 2-digit U.S. state-level FIPS codes. Additionally, you need to account for missing FIPS codes manually at the moment, this function will not plot shapes if you do not provide a FIPS code value. This will likely be remedied in a future release.

x = 1:60
y = rand(Float64, 60)

a = choropleth(x = x, y = y, entity = :usstates)