This example shows how to draw streamlines for a vectorial field using d3js and Canvas.
To calculate the streamlines, the raster-streamlines library is used. To calculate the position of the small arrows at the middle of each line, the svg-path-properties library is used too.
The data is the wind from a sample WRF model, reprojected from Lambert Conformal to latlon so it can be drawn.
The wind speed is plotted under the barbs, using the d3-marching-squares library.
Modified http://d3js.org/topojson.v1.min.js to a secure url
https://d3js.org/d3.v4.min.js
https://d3js.org/topojson.v1.min.js
https://d3js.org/d3-scale-chromatic.v1.min.js