✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Reduce filesize of flexdashboards with many plotly objects?

When using plotly objects within R flexdashboards, I notice that file size increases quickly the more charts I add. For example, rendering this example code (pastebin link) produces a HTML file of 7.35 MB. This isn’t too bad, but I typically need to include several times the number of charts used here, which often leads to large files that are difficult to send through conventional channels.

I was wondering if others have advice for keeping file size limited in such cases? For example, do certain plot types or plot parameters influence file size more than others? Do there exist ways to reuse assets from plotly’s underlying libraries across charts?

Thank you.