Enable Vega-Lite under Libraries, wait until it is checked, then paste the whole editor. vegaEmbed('#vis', spec).
Goal
Run every block and confirm the chart is visible.
document.body.innerHTML = '<div id="vis"></div>';
vegaEmbed("#vis", {
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
data: { values: [{c:"Nairobi",u:21},{c:"Mombasa",u:15},{c:"Kisumu",u:15}] },
mark: "bar",
encoding: { x: { field: "c", type: "nominal" }, y: { field: "u", type: "quantitative" } }
});
console.log("embedded");document.body.innerHTML = '<div id="vis"></div>';
console.log("vegaEmbed", typeof vegaEmbed);