Skip to content

Instantly share code, notes, and snippets.

@szeitlin
Last active January 31, 2017 19:41
Show Gist options
  • Save szeitlin/bac8c0c49d0c0601a4b793ce2d1711dc to your computer and use it in GitHub Desktop.
Save szeitlin/bac8c0c49d0c0601a4b793ce2d1711dc to your computer and use it in GitHub Desktop.
vegas-viz.org
passion project from two guys at Netflix
charting with scala
want to be able to aggregate, filter, facet, color
it can do all of that in one step --> javascript --> rendering
looks like a very concise version of D3 but including the filtering, faceting, and aggregation
plus, because it's D3 you get interactivity (or it's coming soon, anyway)
anatomy of a plot: channels
x/y channel, shape channel, color channel, size channel
vegas supports all the basic chart types:
bar, scatter, area, streams
trellising and layers (bar chart + area for error + triangles)
runs in Zeppelin notebook and consoles (scala REPL will pop up a window and display the plot)
should work on Databricks, Jupyter
1st class support for spark dataframes - it knows if you give it a column name, what that means
visual statistics:
binning, sorting scaling, transforms, time series, aggregation, filtering, support for missing data
(what does that mean, I don't have to remove NaNs like I do for matplotlib?)
1. write the scala
2. chart is rendered via javascript embedded in an HTML iFrame
vegas (scala emits type-checked vega-lite json) --> vega-lite (converts internally to vega json spec)
--> vega (translates to d3js json) --> d3js
someone asked if the aggregations are actually done in spark - the answer is no, it's done in the browser,
they expect you to have pre-filtered the data
q: how much data can it handle? ~200k rows
q: how easy is it to change font sizes, orientation of labels, location of legend? - everything Vega-lite supports, this supports
coming soon: interactive selections with a list or a paintbrush (Halelujah!) - including linked (demo looks good so far!)
*he mentioned a google widget for this?
they said this is very similar to Altair
someone asked about if you resize/zoom interactively, can it save that (answer is no, but they thought that was an interesting suggestion)
someone asked how hard it is to get it going - only need 1 jar to use (I think that's what he said)
someone else asked re: live streaming - answer is not supported yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment