nomic-ai / deepscatter

Zoomable, animated scatterplots in the browser that scales over a billion points

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Points Visibility

bfoltyn opened this issue · comments

I have a question regarding points visibility. I've implemented a filter and I would like to make points that match this filter visible. These points do appear when I zoom in, but I would prefer if they were visible at the default zoom level.

Based on issue #77, I suspect that the visibility of these points may be associated with the ix value. I am wondering if adjusting the ix value would make the points visible at the default zoom level. Could you please advise if this is the appropriate approach for achieving this?

For additional context, I'm using the Deepscatter version available in this example: https://observablehq.com/d/cae8e4a3a8b7d4db#deepscatter. Additionally, I have all of the tiles prefetched using plot._root.root_tile.download_to_depth.

I look forward to your guidance.

Thanks for this clearly phrased request.

It's likely that what's happening is that although you have used download_to_depth, the ix scores are indeed filtering out lower points. The simplest way to change this is by changing the max_points value here in plotAPI to something quite large. (If your dataset is small enough that it wouldn't be catastrophic to transfer the entire thing to the client--less than 10 million points, say, depending on size)--I might just set max_points to 1e100 and not worry about it again.

  await plot.plotAPI({
    source_url: "https://davidnmora.github.io/lyric-viz/deepscatter-tiles",
    point_size: 1,
    max_points: 1e15,
    zoom_balance: 0.35,
})