Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Vega: A Visualization Grammar on top of D3 (trifacta.github.com)
172 points by mmaia on April 2, 2013 | hide | past | favorite | 15 comments


This makes me feel funny. I can't exactly put my finger on why, but here's an attempt.

At first glance the purpose of this project is to make it easier for non-programmers to create visualizations. It's basically d3 without JavaScript, with the added ability to render the visualization using canvas instead of SVG.

When I look at the examples, I get confused. I know d3 and I expected to see less complexity, less manual layout setup, and less explicit data dependencies than I would see in the equivalent d3 code. The only thing that this seems to simplify is the declaration of the range of scales when they depend on the width or height of the canvas.

But maybe I was mistaken on first glance. Maybe the point is not to make it easy for non-programmers to create visualizations, but to make it easier for programs to make visualizations? JSON is easy to generate and to parse. JavaScript is neither.

jheer can you chime in here? Anybody?


Yes, Vega is trying to serve multiple goals. A primary goal is indeed to make it easier for programs to make visualizations. Doing so also creates the opportunity to write new higher-level (and perhaps more user-friendly) generation tools. Possible examples include higher-level grammars like ggplot2 (Vega is lower-level but more expressive) or using Vega as a file format for visual, interactive design tools (an ongoing project in our group at Stanford).

In talks with journalism school instructors and others we've also learned that many novice programmers found models like Protovis easier for students to learn and use than D3, and JavaScript issues often dominated toolkit-specific issues. Our hope is that Vega proves simpler for a variety of tasks; that has certainly been our own experience so far.

That said, your post points out that the messaging on our website may be miscalibrated. We'll consider and revise appropriately.

For more about the specific motivations for Vega, read https://github.com/trifacta/vega/wiki/Vega-and-D3

Thanks for the feedback!


My take on this is the following: d3 / js are great because they provide a portable expressive substrate for providing rich interactive visuals.

At the same time, If I'm writing a tool to do data vis (say in R, Haskell, Scale, etc), while I may want to leverage browser based rendering, I really really really have no interest in "compiling" my visuals to javascript code. My take on vega is it provides a nice "shim" so I can emit a visual which will be rendered to d3, without writing a mini javascript compiler.

tl;dr Vega (as they say in their documentation on the github wiki), is a data format layer that makes it easier for high level data vis tools to emit a format which is used to construct the D3 rendering.


Yes, I would recommend "The Grammar of Graphics" for serious attempts to express visualizations: http://www.amazon.com/gp/aw/d/0387245448


But that's just it -- the various existing implementations of the Grammar of Graphics have solid, proven implementations, tutorials, documentation, and Q/A collections on Stack Overflow. From my admittedly brief impressions of Vega, the procedural implementations also seem to be more concise. Tack on the benefits of a procedural REPL when you're doing exploratory data analysis or nontrivial manipulations and it becomes very hard to justify the switch.

Like most everyone here I think Vega would be much better suited to the role of an intermediate target format for higher-level tools.


I had a similar initial reaction, and your second intuition makes more sense. The responsibility is now offloaded from JS side to server side to generate proper json. I can see a gem to generate the json based on configurations options and combine with data in rails/sinatra apps.


This seems like a potentially valuable way to shift some of the standard PDF reports I generate in R over to dynamic web pages.

I had heard Hadley Wickham talk about rendering ggplot2 graphics using d3 and am wondering if he'll be using this standard.


Here's the beginnings of a Javascript-based ggplot2 implementation on top of d3: https://github.com/gigamonkey/gg


I'm very very excited about this. Mostly because it will make writing a d3 backend to some data vis tools i'm hacking on much easier.


Some of the best uses of D3 show understanding of every part of the process from getting, understanding, and cleaning the data, to thinking about its structure and designing interactions that let the user really get a feel for what is being presented. I think this project helps a little bit somewhere in the middle of the process, and ignores the rest of it.


As we are talking about d3 based libraries, you might want to check dc.js (it's even better: crossfilter is mixed in): http://nickqizhu.github.com/dc.js/ .

It allows creating plots using one chain of methods. And it's even possible to link several plots together, so interaction with one of them affects other.


The grammar of Vega is a description of visualizations, but it isn't a grammar for computation of visualizations. That's where these tools fall short for me, in the sense that they fall short of VTK, VisTrails, and even old OpenDX. I appreciate a regular description, but it seems relatively powerless for data exploration where respect for the model, for uncertainty in data, for symmetries in data, ask for customization of visualizations. Vega is a nice piece of work, and I'd like more, much more.


Nice! A ggplot-like grammar-of-graphics-inspired library was definitely missing for the web.

Keep up the good work.


Also, if you're interested in adding interactivity, I would love to contribute.


Glad to see it's finally released! There was some suspicion it would be shortly after the VIS paper deadline. :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: