Skip to content

Instantly share code, notes, and snippets.

@PBIQueryous
Last active December 28, 2023 15:28
Show Gist options
  • Save PBIQueryous/23f65bc5db0840f942900814a007bb12 to your computer and use it in GitHub Desktop.
Save PBIQueryous/23f65bc5db0840f942900814a007bb12 to your computer and use it in GitHub Desktop.
table_spec
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/penguins.json"},
"transform": [
{
"window": [
{
"op": "row_number",
"as": "row_num"
}
]
},
{
"filter": {
"field": "row_num",
"lte": 15
}
},
{
"fold": [
"Beak Length (mm)",
"Beak Depth (mm)",
"Flipper Length (mm)",
"Body Mass (g)",
"Species",
"Island",
"Sex"
]
}
],
"mark": {"type": "text", "fontWeight": "normal" },
"encoding": {
"y": {
"field": "row_num",
"type": "ordinal",
"axis": null
},
"text": {
"field": "value",
"type": "nominal"
},
"x": {
"field": "key",
"type": "nominal",
"axis": {
"orient": "top",
"labelFontWeight": "bold",
"labelAngle": 0,
"title": null,
"domain": false,
"ticks": false
},
"scale": {"padding": 15}
}
},
"config": {"view": {"stroke": null}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment