Reputation: 2675
I have a shiny app that makes use of the leaflet
package from RStudio. I am plotting a large number of circles on my leaflet map and in my dataset I have the following columns.
The table has 286K records but is only 4.5Mb on the disk as a .Rda file. I am trying to find ways to compress the file or ultimately improve the speed at which the map loads within the shiny app.
At the moment I am hosting on shinyapps.io so I am open to tweaks that might be applied on the server to improve performance. Any guidance on this would be greatly appreciated.
Let me know if some example code is going to be useful for this and I'll whip something together.
Upvotes: 2
Views: 1521
Reputation: 3653
Can shiny apps make use of leaflet plugins? If so, the checkout leaflet-markercluster.
This won't help with load times for the data, but will greatly improve rendering time, which is likely your main bottleneck.
Also, MarkerCluster might start to crap out around 100,000. If you still need a boost in rendering time, checkout the PruneCluster plugin, which has been optimized for particularly large point datasets.
Upvotes: 4