{
	"$schema": "../../../../../../../schema/workflow.json",
	"name": "Sparkbar",
	"description": "Aggregates daily data to weekly averages to demonstrate automatic Sparkbars.",
	"steps": [
		{
			"id": "output-table-0",
			"verb": "derive",
			"input": {
				"source": "stocks"
			},
			"args": {
				"to": "Week Key",
				"column1": "Symbol",
				"operator": "+",
				"column2": "Week"
			}
		},
		{
			"id": "output-table-1",
			"verb": "aggregate",
			"input": {
				"source": "output-table-0"
			},
			"args": {
				"to": "Week Average",
				"groupby": "Week Key",
				"column": "Close",
				"operation": "mean"
			}
		},
		{
			"id": "output-table-2",
			"verb": "lookup",
			"input": {
				"source": "output-table-1",
				"other": "output-table-0"
			},
			"args": {
				"columns": ["Symbol"],
				"on": ["Week Key"]
			}
		},
		{
			"id": "output-table-3",
			"verb": "aggregate",
			"input": {
				"source": "output-table-2"
			},
			"args": {
				"to": "Monthly List",
				"groupby": "Symbol",
				"column": "Week Average",
				"operation": "array_agg"
			}
		}
	],
	"input": ["stocks"]
}
