question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request for JSON specification of Vega functions

See original GitHub issue

cc. @maartenbreddels

We are working on a Python -> Vega-expression transpilation package: https://github.com/QuantStack/py2vega

We provide mocking Python functions for all vega functions. In order to easily keep them up to date with vega it would be super useful to have spec files (JSON files?) for those functions. This spec could be used for automatically generating our code, but it would also be useful for generating the Vega documentation.

It could look like the following:

{
    "string": [
        {"name": "indexof", "args": ["string", "substring"], "doc": "Returns the first index of substring in the input string."},
        [...]
    ],
    [...]
}

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jheercommented, Aug 21, 2019

I’m interpreting this issue as primarily a request for a standardized JSON specification file that documents all functions in the Vega expression language; that is, all functions exported by the vega-functions package. I’m also flagging this as “help-wanted”, as this is a relatively straightforward (if tedious) task for a community contribution. Folks should join the conversation here if they are interested in working on this, as we will want to first come to agreement on the format of the specification file.

2reactions
saulshanabrookcommented, Aug 20, 2019

Few notes from the discussion with @martinRenou and @maartenbreddels:

  • They are doing the opposite thing that we are. They want to translate Python expressions into vega code, by parsing the AST. We are doing the opposite, taking Vega expressions and compiling it to Python.
  • We could maybe use both tools together for E2E testing, to make sure performing both transforms gave the same result in python.

cc @ian-r-rose

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data | Vega-Lite
For example, the following specification loads data from a relative url : data/cars.json . Note that the format type is implicitly "json" by...
Read more >
Allow for put requests in "data" url · Issue #2095 · vega/vega
In the vega specification, the "data" field can take the value of a URI. The parser is then able to make a get...
Read more >
Tutorial: Getting Started with Vega - docs
Step 1 - Create the Vega Specification. A Vega JSON specification has the following general structure: const exampleVega = { width: <numeric>, height:...
Read more >
VegaChart | Charts - Google Developers
If you require stability, consider using a release of Vega or Vega-Lite ... any Vega chart that you can specify with a Vega...
Read more >
Vega - elm-vega 5.7.1 - Elm Packages
Create Vega visualization specifications in Elm. This package allows you to generate the JSON specs that may be passed to the Vega runtime...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found