The rendering of the choropleth is quite slow, sometimes reaching over 10 seconds (the actual calculation time in producing a figure object is around 2 sec). If you have any ideas how to speed this up (without switching to say scatter_mapbox for approximation) I’d love to hear from you.
I looks really cool! And i agree with @chriddyp, the choropleth visualization looks great. I can come think of a few options that might speed up the drawing. The first the is data reduction,
Simplify the polygons (using e.g. Shapely)
Remove properties that are not used form the GeoJSON
The second would be to use data compression such a geobuf. I am not sure if the Plotly component supports it, but dash-leaflet does. The size reduction depends a lot on the data, so as an initial test you could try simply to compress your GeoJSON to see how your data is affected.
Simplifying the polygons really helped with loading speed. The polygons don’t fit so well in the dense area when zoomed in, but its a good trade off. Thanks for the advice.
One way to speed things up for the choropleth would be to drop your GeoJSON file into /assets and then in the geojson attribute of your trace just put the URL to that file like "/assets/polygons.geojson". This would let the browser reuse the same object over and over again and make subsequent updates faster as only the new data goes over the wire and not the (unchanged, I assume) polygons.