{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "config": { "view": { "stroke": null } }, "data": { "values": [ { "animal": "cattle", "col": 1, "country": "United States" }, { "animal": "cattle", "col": 2, "country": "United States" }, { "animal": "cattle", "col": 3, "country": "United States" }, { "animal": "cattle", "col": 4, "country": "United States" }, { "animal": "cattle", "col": 5, "country": "United States" }, { "animal": "cattle", "col": 6, "country": "United States" }, { "animal": "cattle", "col": 7, "country": "United States" }, { "animal": "cattle", "col": 8, "country": "United States" }, { "animal": "cattle", "col": 9, "country": "United States" }, { "animal": "pigs", "col": 1, "country": "United States" }, { "animal": "pigs", "col": 2, "country": "United States" }, { "animal": "pigs", "col": 3, "country": "United States" }, { "animal": "pigs", "col": 4, "country": "United States" }, { "animal": "pigs", "col": 5, "country": "United States" }, { "animal": "pigs", "col": 6, "country": "United States" }, { "animal": "sheep", "col": 1, "country": "United States" }, { "animal": "sheep", "col": 2, "country": "United States" }, { "animal": "sheep", "col": 3, "country": "United States" }, { "animal": "sheep", "col": 4, "country": "United States" }, { "animal": "sheep", "col": 5, "country": "United States" }, { "animal": "sheep", "col": 6, "country": "United States" }, { "animal": "sheep", "col": 7, "country": "United States" }, { "animal": "cattle", "col": 1, "country": "Great Britain" }, { "animal": "cattle", "col": 2, "country": "Great Britain" }, { "animal": "cattle", "col": 3, "country": "Great Britain" }, { "animal": "pigs", "col": 1, "country": "Great Britain" }, { "animal": "pigs", "col": 2, "country": "Great Britain" }, { "animal": "sheep", "col": 1, "country": "Great Britain" }, { "animal": "sheep", "col": 2, "country": "Great Britain" }, { "animal": "sheep", "col": 3, "country": "Great Britain" }, { "animal": "sheep", "col": 4, "country": "Great Britain" }, { "animal": "sheep", "col": 5, "country": "Great Britain" }, { "animal": "sheep", "col": 6, "country": "Great Britain" }, { "animal": "sheep", "col": 7, "country": "Great Britain" }, { "animal": "sheep", "col": 8, "country": "Great Britain" }, { "animal": "sheep", "col": 9, "country": "Great Britain" }, { "animal": "sheep", "col": 10, "country": "Great Britain" } ] }, "description": "Isotype bar chart using emojis for symbols", "encoding": { "row": { "field": "country", "header": { "title": null }, "type": "nominal" }, "size": { "value": 65 }, "text": { "field": "emoji", "type": "nominal" }, "x": { "axis": null, "field": "rank", "type": "ordinal" }, "y": { "axis": null, "field": "animal", "sort": null, "type": "nominal" } }, "height": 200, "mark": { "baseline": "middle", "type": "text" }, "transform": [ { "as": "emoji", "calculate": "{'cattle': '🐄', 'pigs': '🐖', 'sheep': '🐏'}[datum.animal]" }, { "groupby": [ "country", "animal" ], "window": [ { "as": "rank", "op": "rank" } ] } ], "width": 800 }