Scatter Mapbox slows down when there are too many points on the map

Hello,

I am trying to display a Scatter Mapbox on my browser using Dash. When the number of points to be plotted on the map are low in number, the load time is fast and it is responsive. As I keep adding more and more points, the performance is slowing down to a crawl. (I am planning to plot around 490,000). Is there a way I can improve the responsiveness?

Note: I am not performing any operations (like joins, aggregation, etc) on the dataset too. I have a CSV file with addresses and their coordinates and a couple of other columns.

I would recommend to use some form of aggregation for your points (who is going to check 490k individual points?).

You could use Datashader or hexagonal binning which has just been added to Plotly 4.9 :slight_smile:

Another option would be to use point clustering. I am currently working on a new clustering component for Dash Leaflet, which should be able to handle the 490k points without sacrificing responsiveness :slight_smile:

I understand that nobody would want to see 490K points at once, but, and correct me if I am wrong, my belief is that the application shouldn’t slow down to that extent.

I will check the two techniques you’ve suggested and check which works for me.

You are using dash_leaflet. Can this be used for plotly express as well?

Dash Leaflet is an alternative map component, so you cannot mix it with Plotly.