Skip to content

Commit 8d21f39

Browse files
authored
docs about pydeck vs lonboard differences (#118)
1 parent 6179d2b commit 8d21f39

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/alternatives.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ The downside of ipyleaflet is that it doesn't support large datasets as well. It
1212

1313
Lonboard does not try to cover deck.gl's _full_ API, but rather has an opinionated approach that nudges users to the fastest rendering for many common use cases.
1414

15+
### Why not contribute back to pydeck?
16+
17+
Pydeck and lonboard have very different goals.
18+
19+
A stated goal of pydeck is to be non-opinionated and to allow users with various data sources (GeoJSON strings, URLs to arbitrary data sources, etc.) to render. It makes sense for "official" bindings to be non-opinionated, but lonboard takes an opposite tack. By forcing users to use Arrow, we can get reliably fast performance the very common use case of rendering `GeoDataFrame`s. A downside here is that an Arrow-based implementation has required dependencies that pydeck wouldn't want. `pyarrow` on the Python side is 90MB on disk. Arrow JS on the JS side is ~200kb, and the default `parquet-wasm` build is ~1MB.
20+
21+
Pydeck is tightly tied into the deck.gl [JSON renderer](https://deck.gl/docs/api-reference/json/overview), which allows describing a map state fully in JSON. It's not clear how this would work with the JavaScript GeoArrow layers.
22+
23+
Aside from this, pydeck and lonboard use different widget architectures. Pydeck is built on the historical ipywidget layout, using the [widget cookiecutter as inspiration](https://github.com/jupyter-widgets/widget-ts-cookiecutter) and having a separate Jupyter Widget package published to NPM. Lonboard takes a newer approach (unavailable at the time pydeck was created) that uses [Anywidget](https://anywidget.dev/), vastly simplifying the widget process.
24+
1525
## Lonboard vs datashader
1626

1727
[Datashader](https://datashader.org/) is a truly _scalable_ rendering library. Datashader will re-render your data from scratch when panning around in a map. This allows datashader to _aggregate_ the source data before rendering. Datashader _minimizes the amount of data being rendered_ and thus, in theory, Datashader should perform well for datasets as large as your computer's memory.

0 commit comments

Comments
 (0)