Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vega-Lite Shorthand #2421

Closed
amitkaps opened this issue May 25, 2017 · 5 comments
Closed

Vega-Lite Shorthand #2421

amitkaps opened this issue May 25, 2017 · 5 comments

Comments

@amitkaps
Copy link
Contributor

I am finding that it is still hard for users to directly write vega-lite by hand. Is there any plans to bring a vega-lite shorthand back?

Something like the following:

data(url/cars.json)
mark(point)
x(Horsepower, Q)
y(Miles_per_Gallon, Q)

which compiles to this

{
  "data": {"url": "data/cars.json"},
  "mark": "point",
  "encoding": {
    "x": {"field": "Horsepower","type": "Q"},
    "y": {"field": "Miles_per_Gallon","type": "Q"}
  }
}
@amitkaps amitkaps changed the title Vega-lite Shorthand Vega-Lite Shorthand May 25, 2017
@amitkaps
Copy link
Contributor Author

Basically taking inspiration from Brunel specification for writing vis - http://brunel.mybluemix.net/docs/

@domoritz
Copy link
Member

We will not bring the shorthand because we think any wrapper should be an external library. There already exists great wrappers for example in Python (Altair). We have plans to write something similar in JavaScript (see #2280).

Of course, you can write your own wrapper. However, I personally think that a wrapper embedded in an existing programming language is better because of the additional tooling you get. Vega-Lite will stay in JSON, which is compatible with almost every programming language and native to the web.

@kanitw
Copy link
Member

kanitw commented May 25, 2017

Note that We have a shorthand as a part of CompassQL, but both CompassQL and its shorthand don't support composition yet and we currently don't plan to make the CompassQL supports composition within the next year as it is not needed in Voyager yet.

As Dom said, we might add a JS APIs wrapper for Vega-Lite similar to Altair #2280.

@amitkaps
Copy link
Contributor Author

Thanks for quick response. Will create myself for my use case.

@kanitw
Copy link
Member

kanitw commented May 31, 2017

Sure. You might find some of our approach in CompassQL helpful. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants