-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add preliminary support for vega lite #7
Conversation
Ah I see that in the mapd reference:
Here we are performing a formula expression against a new aggregate transform. So we either need to find a way to get compile a vega schema without those transforms or add support for this type of transform to mapd (probably hard). |
09de5e4
to
769878b
Compare
I removed that formula expression manually and now we are hitting another error:
For this vega spec: {
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"autosize": "none",
"padding": 5,
"width": 200,
"height": 400,
"style": "cell",
"data": [
{
"name": "data_0",
"sql": "SELECT goog_x as x, goog_y as y, tweets_nov_feb.rowid FROM tweets_nov_feb"
}
],
"marks": [
{
"name": "marks",
"type": "symbol",
"style": [
"circle"
],
"from": {
"data": "data_0"
},
"encode": {
"update": {
"opacity": {
"value": 0.7
},
"fill": {
"value": "#4c78a8"
},
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"shape": {
"value": "circle"
}
}
}
}
],
"scales": [
{
"name": "x",
"type": "linear",
"domain": {
"data": "data_0",
"field": "x"
},
"range": [
0,
200
],
"nice": true,
"zero": true
},
{
"name": "y",
"type": "linear",
"domain": {
"data": "data_0",
"field": "y"
},
"range": [
0,
200
],
"nice": true,
"zero": true
}
],
"axes": [
{
"scale": "x",
"orient": "bottom",
"title": "x",
"labelFlush": true,
"labelOverlap": true,
"tickCount": {
"signal": "ceil(width/40)"
},
"zindex": 1
},
{
"scale": "x",
"orient": "bottom",
"grid": true,
"tickCount": {
"signal": "ceil(width/40)"
},
"gridScale": "y",
"domain": false,
"labels": false,
"maxExtent": 0,
"minExtent": 0,
"ticks": false,
"zindex": 0
},
{
"scale": "y",
"orient": "left",
"title": "y",
"labelOverlap": true,
"tickCount": {
"signal": "ceil(height/40)"
},
"zindex": 1
},
{
"scale": "y",
"orient": "left",
"grid": true,
"tickCount": {
"signal": "ceil(height/40)"
},
"gridScale": "x",
"domain": false,
"labels": false,
"maxExtent": 0,
"minExtent": 0,
"ticks": false,
"zindex": 0
}
],
"config": {
"axisY": {
"minExtent": 30
},
"ticks": false
}
} |
I opened vega/altair#843 for some better altair integration, but we should be able to get by without it for now |
Part of #4
This adds supports for vega lite rendering in mapd, by first converting to vega. I have added another cell magic to render yaml as vega lite to test out this feature.
It isn't working, because mapd fails to render the vega that is produced by vega lite.
In the
renderer.ipynb
I try to render this vega lite:it translates to this vega: