{ "$schema": "https://vega.github.io/schema/vega/v5.json", "description": "Likert Scale Ratings Distributions and Medians. (Figure 9 from @jhoffswell and @zcliu's ['Interactive Repair of Tables Extracted from PDF Documents on Mobile Devices'](https://idl.cs.washington.edu/files/2019-InteractiveTableRepair-CHI.pdf))", "background": "white", "padding": 5, "width": 250, "height": 175, "title": {"text": "Questionnaire Ratings", "frame": "group"}, "style": "cell", "encode": {"update": {"stroke": {"value": null}}}, "data": [ { "name": "medians", "values": [ { "name": "Identify Errors:", "median": 1.999976, "lo": "Easy", "hi": "Hard" }, {"name": "Fix Errors:", "median": 2, "lo": "Easy", "hi": "Hard"}, { "name": "Easier to Fix:", "median": 1.999969, "lo": "Toolbar", "hi": "Gesture" }, { "name": "Faster to Fix:", "median": 2.500045, "lo": "Toolbar", "hi": "Gesture" }, { "name": "Easier on Phone:", "median": 1.500022, "lo": "Toolbar", "hi": "Gesture" }, { "name": "Easier on Tablet:", "median": 2.99998, "lo": "Toolbar", "hi": "Gesture" }, { "name": "Device Preference:", "median": 4.500007, "lo": "Phone", "hi": "Tablet" } ] }, { "name": "values", "values": [ {"value": 2, "name": "Identify Errors:", "id": "P1"}, {"value": 2, "name": "Fix Errors:", "id": "P1"}, {"value": 3, "name": "Easier to Fix:", "id": "P1"}, {"value": 4, "name": "Faster to Fix:", "id": "P1"}, {"value": 2, "name": "Easier on Phone:", "id": "P1"}, {"value": 5, "name": "Easier on Tablet:", "id": "P1"}, {"value": 5, "name": "Device Preference:", "id": "P1"}, {"value": 1, "name": "Tablet_First", "id": "P1"}, {"value": 1, "name": "Toolbar_First", "id": "P1"}, {"value": 2, "name": "Identify Errors:", "id": "P2"}, {"value": 3, "name": "Fix Errors:", "id": "P2"}, {"value": 4, "name": "Easier to Fix:", "id": "P2"}, {"value": 5, "name": "Faster to Fix:", "id": "P2"}, {"value": 5, "name": "Easier on Phone:", "id": "P2"}, {"value": 5, "name": "Easier on Tablet:", "id": "P2"}, {"value": 5, "name": "Device Preference:", "id": "P2"}, {"value": 1, "name": "Tablet_First", "id": "P2"}, {"value": 1, "name": "Toolbar_First", "id": "P2"}, {"value": 2, "name": "Identify Errors:", "id": "P3"}, {"value": 2, "name": "Fix Errors:", "id": "P3"}, {"value": 2, "name": "Easier to Fix:", "id": "P3"}, {"value": 1, "name": "Faster to Fix:", "id": "P3"}, {"value": 2, "name": "Easier on Phone:", "id": "P3"}, {"value": 1, "name": "Easier on Tablet:", "id": "P3"}, {"value": 5, "name": "Device Preference:", "id": "P3"}, {"value": 1, "name": "Tablet_First", "id": "P3"}, {"value": 0, "name": "Toolbar_First", "id": "P3"}, {"value": 3, "name": "Identify Errors:", "id": "P4"}, {"value": 3, "name": "Fix Errors:", "id": "P4"}, {"value": 2, "name": "Easier to Fix:", "id": "P4"}, {"value": 2, "name": "Faster to Fix:", "id": "P4"}, {"value": 4, "name": "Easier on Phone:", "id": "P4"}, {"value": 1, "name": "Easier on Tablet:", "id": "P4"}, {"value": 5, "name": "Device Preference:", "id": "P4"}, {"value": 1, "name": "Tablet_First", "id": "P4"}, {"value": 0, "name": "Toolbar_First", "id": "P4"}, {"value": 2, "name": "Identify Errors:", "id": "P5"}, {"value": 2, "name": "Fix Errors:", "id": "P5"}, {"value": 4, "name": "Easier to Fix:", "id": "P5"}, {"value": 4, "name": "Faster to Fix:", "id": "P5"}, {"value": 4, "name": "Easier on Phone:", "id": "P5"}, {"value": 5, "name": "Easier on Tablet:", "id": "P5"}, {"value": 5, "name": "Device Preference:", "id": "P5"}, {"value": 0, "name": "Tablet_First", "id": "P5"}, {"value": 1, "name": "Toolbar_First", "id": "P5"}, {"value": 1, "name": "Identify Errors:", "id": "P6"}, {"value": 3, "name": "Fix Errors:", "id": "P6"}, {"value": 3, "name": "Easier to Fix:", "id": "P6"}, {"value": 4, "name": "Faster to Fix:", "id": "P6"}, {"value": 4, "name": "Easier on Phone:", "id": "P6"}, {"value": 4, "name": "Easier on Tablet:", "id": "P6"}, {"value": 4, "name": "Device Preference:", "id": "P6"}, {"value": 0, "name": "Tablet_First", "id": "P6"}, {"value": 1, "name": "Toolbar_First", "id": "P6"}, {"value": 2, "name": "Identify Errors:", "id": "P7"}, {"value": 3, "name": "Fix Errors:", "id": "P7"}, {"value": 4, "name": "Easier to Fix:", "id": "P7"}, {"value": 5, "name": "Faster to Fix:", "id": "P7"}, {"value": 3, "name": "Easier on Phone:", "id": "P7"}, {"value": 2, "name": "Easier on Tablet:", "id": "P7"}, {"value": 4, "name": "Device Preference:", "id": "P7"}, {"value": 0, "name": "Tablet_First", "id": "P7"}, {"value": 0, "name": "Toolbar_First", "id": "P7"}, {"value": 3, "name": "Identify Errors:", "id": "P8"}, {"value": 1, "name": "Fix Errors:", "id": "P8"}, {"value": 2, "name": "Easier to Fix:", "id": "P8"}, {"value": 4, "name": "Faster to Fix:", "id": "P8"}, {"value": 2, "name": "Easier on Phone:", "id": "P8"}, {"value": 5, "name": "Easier on Tablet:", "id": "P8"}, {"value": 5, "name": "Device Preference:", "id": "P8"}, {"value": 0, "name": "Tablet_First", "id": "P8"}, {"value": 0, "name": "Toolbar_First", "id": "P8"}, {"value": 2, "name": "Identify Errors:", "id": "P9"}, {"value": 3, "name": "Fix Errors:", "id": "P9"}, {"value": 2, "name": "Easier to Fix:", "id": "P9"}, {"value": 4, "name": "Faster to Fix:", "id": "P9"}, {"value": 1, "name": "Easier on Phone:", "id": "P9"}, {"value": 4, "name": "Easier on Tablet:", "id": "P9"}, {"value": 4, "name": "Device Preference:", "id": "P9"}, {"value": 1, "name": "Tablet_First", "id": "P9"}, {"value": 1, "name": "Toolbar_First", "id": "P9"}, {"value": 2, "name": "Identify Errors:", "id": "P10"}, {"value": 2, "name": "Fix Errors:", "id": "P10"}, {"value": 1, "name": "Easier to Fix:", "id": "P10"}, {"value": 1, "name": "Faster to Fix:", "id": "P10"}, {"value": 1, "name": "Easier on Phone:", "id": "P10"}, {"value": 1, "name": "Easier on Tablet:", "id": "P10"}, {"value": 5, "name": "Device Preference:", "id": "P10"}, {"value": 1, "name": "Tablet_First", "id": "P10"}, {"value": 1, "name": "Toolbar_First", "id": "P10"}, {"value": 2, "name": "Identify Errors:", "id": "P11"}, {"value": 2, "name": "Fix Errors:", "id": "P11"}, {"value": 1, "name": "Easier to Fix:", "id": "P11"}, {"value": 1, "name": "Faster to Fix:", "id": "P11"}, {"value": 1, "name": "Easier on Phone:", "id": "P11"}, {"value": 1, "name": "Easier on Tablet:", "id": "P11"}, {"value": 4, "name": "Device Preference:", "id": "P11"}, {"value": 1, "name": "Tablet_First", "id": "P11"}, {"value": 0, "name": "Toolbar_First", "id": "P11"}, {"value": 1, "name": "Identify Errors:", "id": "P12"}, {"value": 3, "name": "Fix Errors:", "id": "P12"}, {"value": 2, "name": "Easier to Fix:", "id": "P12"}, {"value": 3, "name": "Faster to Fix:", "id": "P12"}, {"value": 1, "name": "Easier on Phone:", "id": "P12"}, {"value": 3, "name": "Easier on Tablet:", "id": "P12"}, {"value": 3, "name": "Device Preference:", "id": "P12"}, {"value": 0, "name": "Tablet_First", "id": "P12"}, {"value": 1, "name": "Toolbar_First", "id": "P12"}, {"value": 2, "name": "Identify Errors:", "id": "P13"}, {"value": 2, "name": "Fix Errors:", "id": "P13"}, {"value": 1, "name": "Easier to Fix:", "id": "P13"}, {"value": 1, "name": "Faster to Fix:", "id": "P13"}, {"value": 1, "name": "Easier on Phone:", "id": "P13"}, {"value": 1, "name": "Easier on Tablet:", "id": "P13"}, {"value": 5, "name": "Device Preference:", "id": "P13"}, {"value": 0, "name": "Tablet_First", "id": "P13"}, {"value": 0, "name": "Toolbar_First", "id": "P13"}, {"value": 3, "name": "Identify Errors:", "id": "P14"}, {"value": 3, "name": "Fix Errors:", "id": "P14"}, {"value": 2, "name": "Easier to Fix:", "id": "P14"}, {"value": 2, "name": "Faster to Fix:", "id": "P14"}, {"value": 1, "name": "Easier on Phone:", "id": "P14"}, {"value": 1, "name": "Easier on Tablet:", "id": "P14"}, {"value": 1, "name": "Device Preference:", "id": "P14"}, {"value": 1, "name": "Tablet_First", "id": "P14"}, {"value": 1, "name": "Toolbar_First", "id": "P14"}, {"value": 4, "name": "Identify Errors:", "id": "P15"}, {"value": 5, "name": "Fix Errors:", "id": "P15"}, {"value": 1, "name": "Easier to Fix:", "id": "P15"}, {"value": 1, "name": "Faster to Fix:", "id": "P15"}, {"value": 1, "name": "Easier on Phone:", "id": "P15"}, {"value": 1, "name": "Easier on Tablet:", "id": "P15"}, {"value": 5, "name": "Device Preference:", "id": "P15"}, {"value": 1, "name": "Tablet_First", "id": "P15"}, {"value": 0, "name": "Toolbar_First", "id": "P15"}, {"value": 1, "name": "Identify Errors:", "id": "P16"}, {"value": 3, "name": "Fix Errors:", "id": "P16"}, {"value": 2, "name": "Easier to Fix:", "id": "P16"}, {"value": 2, "name": "Faster to Fix:", "id": "P16"}, {"value": 1, "name": "Easier on Phone:", "id": "P16"}, {"value": 4, "name": "Easier on Tablet:", "id": "P16"}, {"value": 5, "name": "Device Preference:", "id": "P16"}, {"value": 0, "name": "Tablet_First", "id": "P16"}, {"value": 1, "name": "Toolbar_First", "id": "P16"}, {"value": 3, "name": "Identify Errors:", "id": "P17"}, {"value": 2, "name": "Fix Errors:", "id": "P17"}, {"value": 2, "name": "Easier to Fix:", "id": "P17"}, {"value": 2, "name": "Faster to Fix:", "id": "P17"}, {"value": 1, "name": "Easier on Phone:", "id": "P17"}, {"value": 3, "name": "Easier on Tablet:", "id": "P17"}, {"value": 2, "name": "Device Preference:", "id": "P17"}, {"value": 0, "name": "Tablet_First", "id": "P17"}, {"value": 0, "name": "Toolbar_First", "id": "P17"} ] }, { "name": "data_0", "source": "medians", "transform": [ { "type": "filter", "expr": "isValid(datum[\"median\"]) && isFinite(+datum[\"median\"])" } ] }, { "name": "data_1", "source": "values", "transform": [ {"type": "filter", "expr": "datum.name != 'Toolbar_First'"}, {"type": "filter", "expr": "datum.name != 'Tablet_First'"}, {"type": "filter", "expr": "datum.name != 'Participant ID'"}, { "type": "aggregate", "groupby": ["value", "name"], "ops": ["count"], "fields": [null], "as": ["__count"] }, { "type": "filter", "expr": "isValid(datum[\"value\"]) && isFinite(+datum[\"value\"])" } ] } ], "marks": [ { "name": "layer_0_marks", "type": "symbol", "style": ["circle"], "from": {"data": "data_1"}, "encode": { "update": { "fill": {"value": "#6EB4FD"}, "ariaRoleDescription": {"value": "circle"}, "description": { "signal": "\"value: \" + (format(datum[\"value\"], \"\")) + \"; name: \" + (isValid(datum[\"name\"]) ? datum[\"name\"] : \"\"+datum[\"name\"]) + \"; Number of Ratings: \" + (format(datum[\"__count\"], \"\"))" }, "x": {"scale": "x", "field": "value"}, "y": {"scale": "y", "field": "name"}, "size": {"scale": "size", "field": "__count"}, "shape": {"value": "circle"} } } }, { "name": "layer_1_marks", "type": "rect", "style": ["tick"], "from": {"data": "data_0"}, "encode": { "update": { "opacity": {"value": 0.7}, "fill": {"value": "black"}, "ariaRoleDescription": {"value": "tick"}, "description": { "signal": "\"median: \" + (format(datum[\"median\"], \"\")) + \"; name: \" + (isValid(datum[\"name\"]) ? datum[\"name\"] : \"\"+datum[\"name\"])" }, "xc": {"scale": "x", "field": "median"}, "yc": {"scale": "y", "field": "name"}, "height": {"value": 15}, "width": {"value": 1} } } }, { "name": "layer_2_marks", "type": "text", "style": ["text"], "from": {"data": "medians"}, "encode": { "update": { "align": {"value": "right"}, "fill": {"value": "black"}, "description": { "signal": "\"name: \" + (isValid(datum[\"name\"]) ? datum[\"name\"] : \"\"+datum[\"name\"]) + \"; lo: \" + (isValid(datum[\"lo\"]) ? datum[\"lo\"] : \"\"+datum[\"lo\"])" }, "x": {"value": -5}, "y": {"scale": "y", "field": "name"}, "text": { "signal": "isValid(datum[\"lo\"]) ? datum[\"lo\"] : \"\"+datum[\"lo\"]" }, "baseline": {"value": "middle"} } } }, { "name": "layer_3_marks", "type": "text", "style": ["text"], "from": {"data": "medians"}, "encode": { "update": { "align": {"value": "left"}, "fill": {"value": "black"}, "description": { "signal": "\"name: \" + (isValid(datum[\"name\"]) ? datum[\"name\"] : \"\"+datum[\"name\"]) + \"; hi: \" + (isValid(datum[\"hi\"]) ? datum[\"hi\"] : \"\"+datum[\"hi\"])" }, "x": {"value": 255}, "y": {"scale": "y", "field": "name"}, "text": { "signal": "isValid(datum[\"hi\"]) ? datum[\"hi\"] : \"\"+datum[\"hi\"]" }, "baseline": {"value": "middle"} } } } ], "scales": [ { "name": "x", "type": "linear", "domain": [0, 6], "range": [0, {"signal": "width"}], "zero": true }, { "name": "y", "type": "point", "domain": { "fields": [ {"data": "data_1", "field": "name"}, {"data": "data_0", "field": "name"}, {"data": "medians", "field": "name"} ] }, "range": [0, {"signal": "height"}], "padding": 0.5 }, { "name": "size", "type": "linear", "domain": {"data": "data_1", "field": "__count"}, "range": [0, 361], "zero": true } ], "axes": [ { "scale": "y", "orient": "left", "grid": true, "offset": 50, "gridScale": "x", "domain": false, "labels": false, "aria": false, "maxExtent": 0, "minExtent": 0, "ticks": false, "zindex": 0 }, { "scale": "x", "orient": "bottom", "grid": false, "values": [1, 2, 3, 4, 5], "labelFlush": true, "labelOverlap": true, "zindex": 0 }, { "scale": "y", "orient": "left", "grid": false, "domain": false, "labelFontWeight": "bold", "offset": 50, "ticks": false, "zindex": 0 } ], "legends": [ { "offset": 75, "title": "Number of Ratings", "size": "size", "symbolType": "circle", "encode": { "symbols": { "update": { "fill": {"value": "#6EB4FD"}, "stroke": {"value": "transparent"} } } } } ] }