Skip to content

Instantly share code, notes, and snippets.

@georgewfraser
Last active December 24, 2022 18:15
Show Gist options
  • Save georgewfraser/e1a561c0a8aa99f7c8d977cd6021e5c7 to your computer and use it in GitHub Desktop.
Save georgewfraser/e1a561c0a8aa99f7c8d977cd6021e5c7 to your computer and use it in GitHub Desktop.
Benchmark 2020 vs 2022
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Log-scaled Histogram. We may improve the support of this. See https://github.com/vega/vega-lite/issues/4792.",
"data": {
"values": [
{"warehouse": "BigQuery", "year": 2020, "time": 11.18},
{"warehouse": "BigQuery", "year": 2022, "time": 7.35},
{"warehouse": "Snowflake", "year": 2020, "time": 8.21},
{"warehouse": "Snowflake", "year": 2022, "time": 6.61},
{"warehouse": "Databricks", "year": 2020, "time": 18.08},
{"warehouse": "Databricks", "year": 2022, "time": 9.61},
{"warehouse": "Redshift", "year": 2020, "time": 8.24},
{"warehouse": "Redshift", "year": 2022, "time": 7.2}
]
},
"encoding": {
"x": {
"field": "time",
"type": "quantitative",
"title": "GEOMEAN TIME"
},
"y": {
"field": "warehouse",
"type": "nominal",
"title": "PLATFORM",
"sort": {"field": "time", "order": "descending"}
}
},
"layer": [
{
"mark": "line",
"encoding": {
"detail": {"field": "warehouse", "type": "nominal"},
"color": {"value": "#BEBADE"}
}
},
{
"mark": {"type": "point", "filled": true, "size": 150, "opacity": 1},
"encoding": {
"color": {
"field": "year",
"type": "ordinal",
"scale": {"domain": [2020, 2022], "range": ["#F4C6BC", "#8BAFFF"]},
"title": "Year"
}
}
}
],
"width": 500,
"height": 250,
"config": {
"font": "Verdana",
"axis": {
"titleFontSize": 14,
"titleFontWeight": "lighter",
"titleColor": "#2F6BE8",
"labelFontWeight": "lighter",
"labelFontSize": 12,
"labelOpacity": 0.75,
"domainOpacity": 0.5,
"tickOpacity": 0.5,
"titlePadding": 50
},
"axisLeft": {
},
"axisBottom": {
"tickMinStep": 5,
"gridColor": {
"condition": {"test": {"field": "value", "equal": 0}, "value": null},
"value": "#8EB2FF"
},
"gridDash": [1, 3]
},
"legend": {
"titleFontSize": 12,
"titleFontWeight": "lighter",
"labelFontSize": 12,
"labelFontWeight": "lighter",
"rowPadding": 10,
"titlePadding": 10
},
"style": {"cell": {"stroke": "transparent"}}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment