render({
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
width: 600,
height: 60,
layer: [
{
transform: [
{
aggregate: [
{ op: "q1", field: "lat", as: "q1" },
{ op: "q3", field: "lat", as: "q3" }
]
}
],
mark: { type: "bar", size: 20, color: "#a3c9f1" },
encoding: {
x: { field: "q1", type: "quantitative" },
x2: { field: "q3" }
}
},
{
transform: [
{
aggregate: [{ op: "min", field: "lat", as: "lat" }]
}
],
mark: { type: "tick", size: 30, color: "orange " },
encoding: {
x: { field: "lat", type: "quantitative" }
}
},
{
transform: [
{
aggregate: [{ op: "max", field: "lat", as: "lat" }]
}
],
mark: { type: "tick", size: 30, color: "black" },
encoding: {
x: { field: "lat", type: "quantitative" }
}
},
{
transform: [
{
aggregate: [{ op: "mean", field: "lat", as: "lat" }]
}
],
mark: { type: "tick", size: 30, color: "red" },
encoding: {
x: { field: "lat", type: "quantitative" }
}
}
],
encoding: {
x: {
field: "lat",
type: "quantitative",
scale: { domain: [47.65161, 47.6698722839355] },
axis: { title: "Latitude" }
},
y: { value: 30 }
},
data: { values: restaurants }
})