Black Lives Matter. Please consider donating to Black Girls Code today.

Do Dash Mapbox maps use vector tileing?

The Mapbox vector-tile specification reduces data transfer between server and client when mapping vector layers by splitting the data into tiles (see here). Does Dash’s implementation of mapbox do vector tileing as well? Would Dash be suited to mapping large numbers of lines/points?

Dash’s Graph component uses plotly.js's abstraction around mapbox-gl-js. Mapbox GL JS uses vector tiles and WebGL. It is well suited for plotting large numbers of lines and points.

So is the Dash server generating the complete JS including data before sending to the client? It’s not slicing up the data into tiles?

The Dash server serves plotly.js and a JSON description of the scattermapbox chart. plotly.js and mapbox-gl-js take care of the rest, including fetching the data for the vector-tiles and rendering the vector-tiles in the browser.

So if I had a Dash app that was fetching a table of 20,000 lines and then displaying them on a map, would mapbox-gl-js be slicing that up into tiles to serve to the client? Or should I instead point the source of data within the Dash app to a vector tile server like tilestache

Graphs are rendered client-side in the browser. If you have 20k lines with 10k points each, then 20k*10k points will be served as JSON from the server to the browser and then rendered in the web browser using webgl.

But what I’m trying to get at is this JSON of data will be transferred all at once from the server? It won’t be sliced into zoom and view dependent tiles?

Yes, it will be transferred all at once. When zooming and panning, Mapbox GL JS may make subsquent queries to their tile server to re-render the map background, but the actual data on the plot (the lines and the points) are transferred to client at the start.