{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "config": { "view": { "stroke": null } }, "description": "Geographic position of London underground lines", "height": 500, "layer": [ { "data": { "format": { "feature": "boroughs", "type": "topojson" }, "url": "https://vega.github.io/vega-lite/data/londonBoroughs.json" }, "encoding": { "color": { "value": "#ddc" } }, "mark": { "stroke": "rgb(251,247,238)", "strokeWidth": 2, "type": "geoshape" } }, { "data": { "url": "https://vega.github.io/vega-lite/data/londonCentroids.json" }, "encoding": { "latitude": { "field": "cy", "type": "quantitative" }, "longitude": { "field": "cx", "type": "quantitative" }, "opacity": { "value": 0.6 }, "size": { "value": 8 }, "text": { "field": "bLabel", "type": "nominal" } }, "mark": "text", "transform": [ { "as": "bLabel", "calculate": "indexof (datum.name,' ') > 0 ? substring(datum.name,0,indexof(datum.name, ' ')) : datum.name" } ] }, { "data": { "format": { "feature": "line", "type": "topojson" }, "url": "https://vega.github.io/vega-lite/data/londonTubeLines.json" }, "encoding": { "color": { "field": "id", "legend": { "offset": 0, "orient": "bottom-right", "title": null }, "scale": { "domain": [ "Bakerloo", "Central", "Circle", "District", "DLR", "Hammersmith & City", "Jubilee", "Metropolitan", "Northern", "Piccadilly", "Victoria", "Waterloo & City" ], "range": [ "rgb(137,78,36)", "rgb(220,36,30)", "rgb(255,206,0)", "rgb(1,114,41)", "rgb(0,175,173)", "rgb(215,153,175)", "rgb(106,114,120)", "rgb(114,17,84)", "rgb(0,0,0)", "rgb(0,24,168)", "rgb(0,160,226)", "rgb(106,187,170)" ] }, "type": "nominal" } }, "mark": { "filled": false, "strokeWidth": 2, "type": "geoshape" } } ], "width": 700 }