flekschas / jupyter-scatter

Interactive 2D scatter plot widget for Jupyter Lab and Notebook. Scales to millions of points!
https://jupyter-scatter.dev
Apache License 2.0
310 stars 11 forks source link

Enhancement: Zoomable plots (online data fetching) #129

Open mireklzicar opened 1 month ago

mireklzicar commented 1 month ago

Is it technically feasible to implement dynamic plots? I have in mind something like this: https://holoviews.org/gallery/apps/bokeh/mandelbrot.html Especially for fractals/attractors as well as for geodata it makes sense to fetch the datapoints based on given zoom level or xy range and display them as the user zooms or moves in the plot.

This feature would make regl-scatterplot and jupyter-scatter even more scalable for datasets which are currently OOM.

mandelbrot

flekschas commented 1 month ago

I agree this would be an absolutely fantastic feature! And it's on my radar for a while now. Unfortunately this feature isn't trivial to implement and it'll likely take a while before it lands as we have to think about a couple of things:

  1. How should the request protocol look like for tiled data access
  2. How can the user create a tiled dataset
  3. regl-scatterplot's data loading strategy needs to be refactored to support view-based data updates (beyond the rendering, we also have to update the spatial index for selecting points)

None of this should be too hard as we can draw a lot of inspiration from HiGlass and deep-scatter for inspiration. But it would be a big lift :)

If you have specific thoughts or would like to take a stab at it, I'm all ears and happy to get you going!