I want to visualize a tree using vega. I have indexed a csv file containing employee data into elasticsearch. I would like vega to query that index and visualize a tree for me.
Every employee has a PersonID and their managers have a SupervisorID in the csv data.
Can someone tell me the vega syntax to do this?
This is what I tried but it didn't give me any results
{
"$schema": "https://vega.github.io/schema/vega/v2.0.json",
"data": [
{
"name": "tree",
"url": {
"index": "bamboo",
},
"transform": [
{
"type": "stratify",
"key": "PersonID",
"parentKey": "SupervisorID"
}
]
},
{
"name": "links",
"source": "tree",
"transform": [
{
"type": "treelinks"
}
]
}
]
}