Skip to content

Instantly share code, notes, and snippets.

@robnewman
Created November 19, 2018 15:35
Show Gist options
  • Save robnewman/8b4aefe596d720200209723030702300 to your computer and use it in GitHub Desktop.
Save robnewman/8b4aefe596d720200209723030702300 to your computer and use it in GitHub Desktop.
# Embedded visualizations
from vega import Vega, VegaLite
VegaLite({
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"repeat": {
"column": [
"subspecies",
"zip code",
"location",
"health",
"caste",
"pollen_carrying"
]
},
"spec": {
"mark": "bar",
"encoding": {
"y": {
"aggregate": "count",
"type": "quantitative"
},
"x": {
"type": "nominal",
"field": {
"repeat": "column"
},
},
"tooltip": [
{
"type": "nominal",
"field": {"repeat": "column"}}
]
}
}
}, df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment