| GA4 |
Penguins |
 |
 |
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"background": "black",
"transform": [
{ "as": "v1", "calculate": "datum['$metric0']"},
{ "as": "d1", "calculate": "datum['$dimension0']"}
],
"vconcat": [
{
"mark": "area",
"transform": [
{
"density": "v1",
"groupby": ["d1"]
}
],
"encoding": {
"x": {"field": "value", "type": "quantitative", "title": null, "axis": {}},
"y": {"field": "density", "type": "quantitative"},
"color": {"field": "d1", "type": "nominal"},
"opacity": {"value": 0.5},
"gird": false
}
},
{
"mark": {
"type": "boxplot",
"extent": "min-max"
},
"encoding": {
"color": {"field": "d1", "type": "nominal", "legend": null},
"y": {"field": "d1", "type": "nominal"},
"x": {
"field": "v1",
"type": "quantitative",
"scale": {"zero": false}
}
}
}
]
}
{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "background": "black", "transform": [ { "as": "v1", "calculate": "datum['$metric0']"}, { "as": "d1", "calculate": "datum['$dimension0']"} ], "vconcat": [ { "mark": "area", "transform": [ { "density": "v1", "groupby": ["d1"] } ], "encoding": { "x": {"field": "value", "type": "quantitative", "title": null, "axis": {}}, "y": {"field": "density", "type": "quantitative"}, "color": {"field": "d1", "type": "nominal"}, "opacity": {"value": 0.5}, "gird": false } }, { "mark": { "type": "boxplot", "extent": "min-max" }, "encoding": { "color": {"field": "d1", "type": "nominal", "legend": null}, "y": {"field": "d1", "type": "nominal"}, "x": { "field": "v1", "type": "quantitative", "scale": {"zero": false} } } } ] }