Wind Vector Map
Vector array map showing wind speed and direction.
View this example in the online editor
Vega-Lite JSON Specification
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Vector array map showing wind speed and direction.",
"width": 615,
"height": 560,
"data": {
"url": "data/windvectors.csv",
"format": {"type": "csv", "parse": {"longitude": "number", "latitude": "number"}}
},
"projection": {"type": "equalEarth"},
"mark": {"type": "point", "shape": "wedge", "filled": true},
"encoding": {
"longitude": {"field": "longitude", "type": "quantitative"},
"latitude": {"field": "latitude", "type": "quantitative"},
"color": {
"field": "dir", "type": "quantitative",
"scale": {"domain": [0, 360], "scheme": "rainbow"},
"legend": null
},
"angle": {
"field": "dir", "type": "quantitative",
"scale": {"domain": [0, 360], "range": [180, 540]}
},
"size": {
"field": "speed", "type": "quantitative",
"scale": {"rangeMax": 500}
}
},
"config": {
"aria": false,
"view": {"step": 10, "fill": "black"}
}
}