hvega-0.5.0.0: tests/specs/gallery/multi/multi7.vl
{
"height": 500,
"config": {
"view": {
"stroke": null
}
},
"width": 900,
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"projection": {
"type": "albersUsa"
},
"layer": [
{
"mark": {
"stroke": "#fff",
"fill": "#ddd",
"type": "geoshape"
},
"data": {
"url": "https://vega.github.io/vega-lite/data/us-10m.json",
"format": {
"feature": "states",
"type": "topojson"
}
}
},
{
"transform": [
{
"filter": {
"selection": "mySelection"
}
},
{
"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"
}
],
"mark": {
"color": "black",
"opacity": 0.35,
"type": "rule"
},
"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"
}
}
},
{
"transform": [
{
"groupby": [
"origin"
],
"aggregate": [
{
"op": "count",
"as": "routes"
}
]
},
{
"from": {
"data": {
"url": "https://vega.github.io/vega-lite/data/airports.csv"
},
"key": "iata",
"fields": [
"name",
"state",
"latitude",
"longitude"
]
},
"lookup": "origin"
},
{
"filter": "datum.state !== 'PR' && datum.state !== 'VI'"
}
],
"mark": "circle",
"data": {
"url": "https://vega.github.io/vega-lite/data/flights-airport.csv"
},
"selection": {
"mySelection": {
"nearest": true,
"empty": "none",
"type": "single",
"on": "mouseover",
"fields": [
"origin"
]
}
},
"encoding": {
"size": {
"field": "routes",
"scale": {
"range": [
0,
1000
]
},
"type": "quantitative",
"legend": null
},
"latitude": {
"field": "latitude",
"type": "quantitative"
},
"tooltip": {
"field": "name",
"type": "nominal"
},
"longitude": {
"field": "longitude",
"type": "quantitative"
},
"order": {
"field": "routes",
"sort": "descending",
"type": "quantitative"
}
}
}
],
"description": "One dot per airport in the US overlayed on geoshape"
}