{ "transform": [ { "groupby": [ "age" ], "aggregate": [ { "op": "min", "as": "lowerWhisker", "field": "people" }, { "op": "q1", "as": "lowerBox", "field": "people" }, { "op": "median", "as": "midBox", "field": "people" }, { "op": "q3", "as": "upperBox", "field": "people" }, { "op": "max", "as": "upperWhisker", "field": "people" } ] } ], "data": { "url": "https://vega.github.io/vega-lite/data/population.json" }, "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "layer": [ { "mark": { "style": "boxWhisker", "type": "rule" }, "encoding": { "y2": { "field": "lowerBox" }, "y": { "field": "lowerWhisker", "type": "quantitative", "axis": { "title": "Population" } } } }, { "mark": { "style": "boxWhisker", "type": "rule" }, "encoding": { "y2": { "field": "upperWhisker" }, "y": { "field": "upperBox", "type": "quantitative" } } }, { "mark": { "style": "box", "type": "bar" }, "encoding": { "size": { "value": 5 }, "y2": { "field": "upperBox" }, "y": { "field": "lowerBox", "type": "quantitative" } } }, { "mark": { "style": "boxMid", "type": "tick" }, "encoding": { "color": { "value": "white" }, "size": { "value": 5 }, "y": { "field": "midBox", "type": "quantitative" } } } ], "encoding": { "x": { "field": "age", "type": "ordinal" } }, "description": "A vertical 2D box plot showing median, min, and max in the US population distribution of age groups in 2000." }