Is there a way to convert vega-lite-api code into vega-lite json format ?
For example automatically turning :
vl.markBar().data('data/movies.json').encode(
vl.x().fieldQ('IMDB_Rating').bin(true),
vl.y().count()
)
Into
{
"mark": "bar",
"data": {"url": "data/movies.json"},
"encoding": {
"x": {
"bin": true,
"field": "IMDB_Rating",
"type": "quantitative"
},
"y": {
"aggregate": "count",
"type": "quantitative"
}
}
}