{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "config": { "view": { "stroke": null } }, "description": "Rules (line segments) connecting SEA to every airport reachable via direct flight", "height": 500, "layer": [ { "data": { "format": { "feature": "states", "type": "topojson" }, "url": "https://vega.github.io/vega-lite/data/us-10m.json" }, "encoding": { "color": { "value": "#eee" } }, "mark": "geoshape" }, { "data": { "url": "https://vega.github.io/vega-lite/data/airports.csv" }, "encoding": { "color": { "value": "gray" }, "latitude": { "field": "latitude", "type": "quantitative" }, "longitude": { "field": "longitude", "type": "quantitative" }, "size": { "value": 5 } }, "mark": "circle" }, { "data": { "url": "https://vega.github.io/vega-lite/data/flights-airport.csv" }, "encoding": { "latitude": { "field": "o.latitude", "type": "quantitative" }, "latitude2": { "field": "d.latitude" }, "longitude": { "field": "o.longitude", "type": "quantitative" }, "longitude2": { "field": "d.longitude" } }, "mark": "rule", "transform": [ { "filter": { "equal": "SEA", "field": "origin" } }, { "as": "o", "from": { "data": { "url": "https://vega.github.io/vega-lite/data/airports.csv" }, "key": "iata" }, "lookup": "origin" }, { "as": "d", "from": { "data": { "url": "https://vega.github.io/vega-lite/data/airports.csv" }, "key": "iata" }, "lookup": "destination" } ] } ], "projection": { "type": "albersUsa" }, "width": 800 }