Skip to content

Commit

Permalink
Add vl-convert tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Jan 31, 2024
1 parent 7c73cc6 commit abe4868
Show file tree
Hide file tree
Showing 55 changed files with 82,973 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,480 changes: 1,480 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/circle_binned.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37,117 changes: 37,117 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/custom_projection.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
526 changes: 526 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/geoScale.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,199 changes: 1,199 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/line_with_log_scale.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,336 changes: 3,336 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/lookup_urls.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,679 changes: 1,679 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/maptile_background.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19,944 changes: 19,944 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/seattle-weather.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,777 changes: 1,777 additions & 0 deletions avenger-vega-test-data/vega-scenegraphs/vl-convert/stocks_locale.sg.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"data": [
{
"name": "data-e90feaf959fd425e1afec00a92fd04a7",
"values": [
{"a": "a1", "b": "b1", "c": "x", "p": "0.14"},
{"a": "a1", "b": "b1", "c": "y", "p": "0.60"},
{"a": "a1", "b": "b1", "c": "z", "p": "0.03"},
{"a": "a1", "b": "b2", "c": "x", "p": "0.80"},
{"a": "a1", "b": "b2", "c": "y", "p": "0.38"},
{"a": "a1", "b": "b2", "c": "z", "p": "0.55"},
{"a": "a1", "b": "b3", "c": "x", "p": "0.11"},
{"a": "a1", "b": "b3", "c": "y", "p": "0.58"},
{"a": "a1", "b": "b3", "c": "z", "p": "0.79"},
{"a": "a2", "b": "b1", "c": "x", "p": "0.83"},
{"a": "a2", "b": "b1", "c": "y", "p": "0.87"},
{"a": "a2", "b": "b1", "c": "z", "p": "0.67"},
{"a": "a2", "b": "b2", "c": "x", "p": "0.97"},
{"a": "a2", "b": "b2", "c": "y", "p": "0.84"},
{"a": "a2", "b": "b2", "c": "z", "p": "0.90"},
{"a": "a2", "b": "b3", "c": "x", "p": "0.74"},
{"a": "a2", "b": "b3", "c": "y", "p": "0.64"},
{"a": "a2", "b": "b3", "c": "z", "p": "0.19"},
{"a": "a3", "b": "b1", "c": "x", "p": "0.57"},
{"a": "a3", "b": "b1", "c": "y", "p": "0.35"},
{"a": "a3", "b": "b1", "c": "z", "p": "0.49"},
{"a": "a3", "b": "b2", "c": "x", "p": "0.91"},
{"a": "a3", "b": "b2", "c": "y", "p": "0.38"},
{"a": "a3", "b": "b2", "c": "z", "p": "0.91"},
{"a": "a3", "b": "b3", "c": "x", "p": "0.99"},
{"a": "a3", "b": "b3", "c": "y", "p": "0.80"},
{"a": "a3", "b": "b3", "c": "z", "p": "0.37"}
]
},
{
"name": "data_0",
"source": "data-e90feaf959fd425e1afec00a92fd04a7",
"transform": [
{
"type": "stack",
"groupby": ["c", "a", "b"],
"field": "p",
"sort": {"field": [], "order": []},
"as": ["p_start", "p_end"],
"offset": "zero"
},
{
"type": "filter",
"expr": "isValid(datum[\"p\"]) && isFinite(+datum[\"p\"])"
}
]
},
{
"name": "column_domain",
"source": "data_0",
"transform": [{"type": "aggregate", "groupby": ["b"]}]
},
{
"name": "row_domain",
"source": "data_0",
"transform": [{"type": "aggregate", "groupby": ["a"]}]
}
],
"signals": [
{"name": "child_width", "value": 60},
{"name": "y_step", "value": 8},
{
"name": "child_height",
"update": "bandspace(domain('y').length, 0.1, 0.05) * y_step"
}
],
"layout": {
"padding": 20,
"offset": {"rowTitle": 10, "columnTitle": 10},
"columns": {"signal": "length(data('column_domain'))"},
"bounds": "full",
"align": "all"
},
"marks": [
{
"name": "row-title",
"type": "group",
"role": "row-title",
"title": {
"text": "Factor A",
"orient": "left",
"style": "guide-title",
"offset": 10
}
},
{
"name": "column-title",
"type": "group",
"role": "column-title",
"title": {"text": "Factor B", "style": "guide-title", "offset": 10}
},
{
"name": "row_header",
"type": "group",
"role": "row-header",
"from": {"data": "row_domain"},
"sort": {"field": "datum[\"a\"]", "order": "ascending"},
"title": {
"text": {
"signal": "isValid(parent[\"a\"]) ? parent[\"a\"] : \"\"+parent[\"a\"]"
},
"orient": "left",
"style": "guide-label",
"frame": "group",
"baseline": "middle",
"align": "right",
"angle": 0,
"offset": 10
},
"encode": {"update": {"height": {"signal": "child_height"}}}
},
{
"name": "column_header",
"type": "group",
"role": "column-header",
"from": {"data": "column_domain"},
"sort": {"field": "datum[\"b\"]", "order": "ascending"},
"title": {
"text": {
"signal": "isValid(parent[\"b\"]) ? parent[\"b\"] : \"\"+parent[\"b\"]"
},
"style": "guide-label",
"frame": "group",
"offset": 10
},
"encode": {"update": {"width": {"signal": "child_width"}}}
},
{
"name": "column_footer",
"type": "group",
"role": "column-footer",
"from": {"data": "column_domain"},
"sort": {"field": "datum[\"b\"]", "order": "ascending"},
"encode": {"update": {"width": {"signal": "child_width"}}},
"axes": [
{
"scale": "x",
"orient": "bottom",
"grid": false,
"format": "%",
"labelFlush": true,
"labelOverlap": true,
"tickCount": {"signal": "ceil(child_width/40)"},
"zindex": 0
}
]
},
{
"name": "cell",
"type": "group",
"style": "cell",
"from": {
"facet": {
"name": "facet",
"data": "data_0",
"groupby": ["a", "b"],
"aggregate": {"cross": true}
}
},
"sort": {
"field": ["datum[\"a\"]", "datum[\"b\"]"],
"order": ["ascending", "ascending"]
},
"encode": {
"update": {
"width": {"signal": "child_width"},
"height": {"signal": "child_height"}
}
},
"marks": [
{
"name": "child_marks",
"type": "rect",
"style": ["bar"],
"from": {"data": "facet"},
"encode": {
"update": {
"fill": {"scale": "color", "field": "c"},
"ariaRoleDescription": {"value": "bar"},
"description": {
"signal": "\"p: \" + (format(datum[\"p\"], \"%\")) + \"; c: \" + (isValid(datum[\"c\"]) ? datum[\"c\"] : \"\"+datum[\"c\"]) + \"; settings: \" + (isValid(datum[\"c\"]) ? datum[\"c\"] : \"\"+datum[\"c\"])"
},
"x": {"scale": "x", "field": "p_end"},
"x2": {"scale": "x", "field": "p_start"},
"y": {"scale": "y", "field": "c"},
"height": {"signal": "max(0.25, bandwidth('y'))"}
}
}
}
],
"axes": [
{
"scale": "x",
"orient": "bottom",
"gridScale": "y",
"grid": true,
"tickCount": {"signal": "ceil(child_width/40)"},
"domain": false,
"labels": false,
"aria": false,
"maxExtent": 0,
"minExtent": 0,
"ticks": false,
"zindex": 0
}
]
}
],
"scales": [
{
"name": "x",
"type": "linear",
"domain": {"data": "data_0", "fields": ["p_start", "p_end"]},
"range": [0, {"signal": "child_width"}],
"nice": true,
"zero": true
},
{
"name": "y",
"type": "band",
"domain": {"data": "data_0", "field": "c", "sort": true},
"range": {"step": {"signal": "y_step"}},
"paddingInner": 0.1,
"paddingOuter": 0.05
},
{
"name": "color",
"type": "ordinal",
"domain": {"data": "data_0", "field": "c", "sort": true},
"range": "category"
}
],
"legends": [
{
"orient": "bottom",
"title": "settings",
"titleOrient": "left",
"fill": "color",
"direction": "horizontal",
"symbolType": "square"
}
]
}
Loading

0 comments on commit abe4868

Please sign in to comment.