New chart definition with pretty horizontal bars created by Sam
"config": {
"view": {
"continuousWidth": 400,
- "continuousHeight": 300
+ "continuousHeight": 300,
+ "width": 400
},
"axis": {
"labelFontSize": 11
}
},
+ "title": "",
"layer": [
{
"mark": "bar",
"encoding": {
- "x": {
- "type": "nominal",
- "axis": {
- "title": ""
+ "color": {
+ "type": "quantitative",
+ "field": "percentage",
+ "legend": {
+ "format": ".0%"
+ },
+ "scale": {
+ "range": "heatmap"
},
+ "title": "Missingness"
+ },
+ "tooltip": [
+ {
+ "type": "nominal",
"field": "variable",
- "sort": "-y"
+ "title": "Column"
},
- "y": {
+ {
"type": "quantitative",
- "axis": {
+ "field": "value",
+ "format": ".0f",
"title": "Count of nulls"
},
- "field": "value"
- }
- },
- "title": ""
- },
{
- "mark": {
- "type": "text",
- "baseline": "bottom"
+ "type": "quantitative",
+ "field": "percentage",
+ "format": ".2%",
+ "title": "Percentage of nulls"
+ }
+ ],
+ "x": {
+ "type": "quantitative",
+ "axis": {
+ "format": "%",
+ "title": "Percentage of nulls"
},
- "encoding": {
- "text": {
- "type": "nominal",
"field": "percentage"
},
- "x": {
+ "y": {
"type": "nominal",
"axis": {
"title": ""
},
"field": "variable",
- "sort": "-y"
- },
- "y": {
- "type": "quantitative",
- "axis": {
- "title": "Count of nulls"
- },
- "field": "value"
+ "sort": "-x"
}
},
"title": ""
}
],
"data": {
+ "values": "",
"name": "data-0e7bce5a1d2f132e282789d6ef7780fe"
},
- "width": 1250,
"$schema": "https://vega.github.io/schema/vega-lite/v4.8.1.json"
}
\ No newline at end of file
