Skip to content

Instantly share code, notes, and snippets.

@PBI-DataVizzle
Forked from cbaragao/joinplot with deneb
Created November 19, 2023 14:32
Show Gist options
  • Save PBI-DataVizzle/8079944e7c913291d317189d8114f6d2 to your computer and use it in GitHub Desktop.
Save PBI-DataVizzle/8079944e7c913291d317189d8114f6d2 to your computer and use it in GitHub Desktop.
// white wine dataset used from http://archive.ics.uci.edu/dataset/186/wine+quality
{
"data": {
"name": "dataset"
},
"params": [
{
"name": "grid",
"select": "interval",
"bind": "scales"
}
],
"hconcat": [
{
"vconcat": [
{
"mark": "bar",
"height": 100,
"width": 400,
"encoding": {
"x": {
"bin": true,
"field": "Fixed Acidity",
"axis": null
},
"y": {
"aggregate": "count",
"axis": null
},
"yOffset": {
"field": "Fixed Acidity"
}
}
},
{
"mark": "circle",
"height": 400,
"width": 400,
"encoding": {
"x": {
"field": "Fixed Acidity",
"type": "quantitative",
"scale": {
"domain": [
1,
15
]
}
},
"y": {
"field": "Alcohol",
"type": "quantitative",
"scale": {
"domain": [
5,
15
]
}
},
"size": {
"field": "Quality",
"type": "quantitative"
}
}
}
]
},
{
"vconcat": [
{
"mark": "text",
"height": 150,
"width": 150
},
{
"mark": "bar",
"height": 250,
"width": 150,
"encoding": {
"y": {
"bin": true,
"field": "Alcohol",
"axis": null
},
"x": {
"aggregate": "count",
"axis": null
},
"xOffset": {
"field": "Alcohol"
}
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment