Lasso selection in PyDeck #5122
Replies: 3 comments
-
@cornhundred It's not currently supported but it's in my list of tentative updates for pydeck 0.6. A custom layer with the pydeck event handlers could work. It may be easier to use nebula.gl rather than d3 (example of a lasso selection in nebula is here). |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help @ajduberstein! I'll look into nebula.gl. I like the dragging lasso selection in these examples: SVG https://observablehq.com/@fil/lasso-selection or Canvas https://observablehq.com/@fil/lasso-selection-canvas so I'm curious if I could get something simple working with them. I'll see if I can follow along with this examples that links with Observable https://pydeck.gl/custom_layers.html. We imaging that we want users to zoom and pan into our PyDeck visualization and toggle lasso selection model by clicking a button (maybe a Jupyter widget button) that updates the PyDeck layers. |
Beta Was this translation helpful? Give feedback.
-
FYI @ajduberstein I'm trying to get the nebula code sandbox example working on Observable but running into an issue requiring the nebula.gl. I'm also trying to make a custom layer using your |
Beta Was this translation helpful? Give feedback.
-
Hi, if I understand correctly it sounds like it is not possible to do lasso selection out of the box with PyDeck #2658
Would it be possible to build a custom layer for this and use D3 for example to make the lasso selection (e.g. as a transparent SVG on top of the canvas)? We just need the coordinates of the lassoed area and can then use PyDeck's widget communication to update the underlying data (pandas dataframe) and visual (layer in PyDeck).
Beta Was this translation helpful? Give feedback.
All reactions