squiggle/packages/components/src/spec-percentiles.json

374 lines
6.7 KiB
JSON
Raw Normal View History

2022-02-27 04:41:30 +00:00
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 500,
"height": 400,
"padding": 5,
"data": [
{
"name": "facet",
"values": [],
"format": {
"type": "json",
"parse": {
"timestamp": "date"
}
}
2022-02-27 04:41:30 +00:00
},
{
"name": "table",
"source": "facet",
"transform": [
{
"type": "aggregate",
2022-04-07 11:28:33 +00:00
"groupby": ["x"],
2022-02-27 04:41:30 +00:00
"ops": [
"mean",
"mean",
"mean",
"mean",
"mean",
"mean",
"mean",
"mean",
"mean",
"mean",
"mean",
"mean",
"mean"
],
"fields": [
"p1",
"p5",
"p10",
"p20",
"p30",
"p40",
"p50",
"p60",
"p70",
"p80",
"p90",
"p95",
"p99"
],
"as": [
"p1",
"p5",
"p10",
"p20",
"p30",
"p40",
"p50",
"p60",
"p70",
"p80",
"p90",
"p95",
"p99"
]
}
]
}
],
"scales": [
{
"name": "xscale",
"type": "linear",
"nice": true,
"domain": {
"data": "facet",
"field": "x"
},
2022-02-27 04:41:30 +00:00
"range": "width"
},
{
"name": "yscale",
"type": "linear",
"range": "height",
"nice": true,
"zero": true,
"domain": {
"data": "facet",
"field": "p99"
}
2022-02-27 04:41:30 +00:00
}
],
"axes": [
{
"orient": "bottom",
"scale": "xscale",
"grid": false,
"tickSize": 2,
"encode": {
"grid": {
"enter": {
"stroke": {
"value": "#ccc"
}
}
},
"ticks": {
"enter": {
"stroke": {
"value": "#ccc"
}
}
}
2022-02-27 04:41:30 +00:00
}
},
{
"orient": "left",
"scale": "yscale",
"grid": false,
"domain": false,
"tickSize": 2,
"encode": {
"grid": {
"enter": {
"stroke": {
"value": "#ccc"
}
}
},
"ticks": {
"enter": {
"stroke": {
"value": "#ccc"
}
}
}
2022-02-27 04:41:30 +00:00
}
}
],
"marks": [
{
"type": "area",
"from": {
"data": "table"
},
2022-02-27 04:41:30 +00:00
"encode": {
"enter": {
"fill": {
"value": "#4C78A8"
}
},
2022-02-27 04:41:30 +00:00
"update": {
"interpolate": {
"value": "monotone"
},
"x": {
"scale": "xscale",
"field": "x"
},
"y": {
"scale": "yscale",
"field": "p1"
},
"y2": {
"scale": "yscale",
"field": "p99"
},
"opacity": {
"value": 0.05
}
2022-02-27 04:41:30 +00:00
}
}
},
{
"type": "area",
"from": {
"data": "table"
},
2022-02-27 04:41:30 +00:00
"encode": {
"enter": {
"fill": {
"value": "#4C78A8"
}
},
2022-02-27 04:41:30 +00:00
"update": {
"interpolate": {
"value": "monotone"
},
"x": {
"scale": "xscale",
"field": "x"
},
"y": {
"scale": "yscale",
"field": "p5"
},
"y2": {
"scale": "yscale",
"field": "p95"
},
"opacity": {
"value": 0.1
}
2022-02-27 04:41:30 +00:00
}
}
},
{
"type": "area",
"from": {
"data": "table"
},
2022-02-27 04:41:30 +00:00
"encode": {
"enter": {
"fill": {
"value": "#4C78A8"
}
},
2022-02-27 04:41:30 +00:00
"update": {
"interpolate": {
"value": "monotone"
},
"x": {
"scale": "xscale",
"field": "x"
},
"y": {
"scale": "yscale",
"field": "p10"
},
"y2": {
"scale": "yscale",
"field": "p90"
},
"opacity": {
"value": 0.15
}
2022-02-27 04:41:30 +00:00
}
}
},
{
"type": "area",
"from": {
"data": "table"
},
2022-02-27 04:41:30 +00:00
"encode": {
"enter": {
"fill": {
"value": "#4C78A8"
}
},
2022-02-27 04:41:30 +00:00
"update": {
"interpolate": {
"value": "monotone"
},
"x": {
"scale": "xscale",
"field": "x"
},
"y": {
"scale": "yscale",
"field": "p20"
},
"y2": {
"scale": "yscale",
"field": "p80"
},
"opacity": {
"value": 0.2
}
2022-02-27 04:41:30 +00:00
}
}
},
{
"type": "area",
"from": {
"data": "table"
},
2022-02-27 04:41:30 +00:00
"encode": {
"enter": {
"fill": {
"value": "#4C78A8"
}
},
2022-02-27 04:41:30 +00:00
"update": {
"interpolate": {
"value": "monotone"
},
"x": {
"scale": "xscale",
"field": "x"
},
"y": {
"scale": "yscale",
"field": "p30"
},
"y2": {
"scale": "yscale",
"field": "p70"
},
"opacity": {
"value": 0.2
}
2022-02-27 04:41:30 +00:00
}
}
},
{
"type": "area",
"from": {
"data": "table"
},
2022-02-27 04:41:30 +00:00
"encode": {
"enter": {
"fill": {
"value": "#4C78A8"
}
},
2022-02-27 04:41:30 +00:00
"update": {
"interpolate": {
"value": "monotone"
},
"x": {
"scale": "xscale",
"field": "x"
},
"y": {
"scale": "yscale",
"field": "p40"
},
"y2": {
"scale": "yscale",
"field": "p60"
},
"opacity": {
"value": 0.2
}
2022-02-27 04:41:30 +00:00
}
}
},
{
"type": "line",
"from": {
"data": "table"
},
2022-02-27 04:41:30 +00:00
"encode": {
"update": {
"interpolate": {
"value": "monotone"
},
"stroke": {
"value": "#4C78A8"
},
"strokeWidth": {
"value": 2
},
"opacity": {
"value": 0.8
},
"x": {
"scale": "xscale",
"field": "x"
},
"y": {
"scale": "yscale",
"field": "p50"
}
2022-02-27 04:41:30 +00:00
}
}
}
]
2022-04-07 11:28:33 +00:00
}