-
Notifications
You must be signed in to change notification settings - Fork 14
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
Expose Vega expression parsing in Python library #168
Comments
Thanks for the kind words @boydgreenfield. I'm definitely open to exposing more of VegaFusion's functionality through the Python API. That said, for the use case of inspecting / evaluating Vega expressions, I would lean toward building this into vl-convert rather than VegaFusion. vl-convert bundles the Deno JavaScript runtime into a Python package for the primary purpose of static image export. With this setup, we already have the ability to call Vega functions from Python (through Rust), and we could add additional entry points for passing in individual expressions rather than full Vega specifications. The advantage of this approach over using VegaFusion is that it would support the entire Vega expression language, whereas VegaFusion only supports a subset at this point. This assumes that compatibility is more important than performance of course. Also see vega/altair#3365 for some more discussion. If you're interested in this approach, I'll transfer this issue to the vl-convert repo. Then the next step would be to design the vl-convert API for working with expressions. So if you have specific examples of what you'd like to be able to do (or even better API ideas) that would be helpful! |
Apologies for the slow reply @jonmmease. Yes happy to discuss this in the context of For context, I'm working on a proof-of-concept around "natural language for data viz" (https://minard.ai) and it'd be nice to be able to parse arbitrary Vega-Expressions in addition to evaluating transforms as is supported in |
Great, issue transferred! |
Thank you for the great library @jonmmease. Have you considered / what do you think about exposing the Vega expression parsing in the Python library so a user can validate, manipulate, or otherwise inspect a Vega expression without having to go through
transformed_data
(and getting a fairly generic PythonValueError
).I'm a little, ahem, rusty, but could be persuaded to help if this is something you'd like to support and you have guidance on a preferred implementation approach. Thanks again!
The text was updated successfully, but these errors were encountered: