Skip to content

Commit

Permalink
DuckDB Spatial example (#504)
Browse files Browse the repository at this point in the history
Added new example with duckdb spatial
  • Loading branch information
kylebarron committed May 6, 2024
1 parent 65aed51 commit bdee1a5
Show file tree
Hide file tree
Showing 6 changed files with 257 additions and 5 deletions.
Binary file added assets/duckdb-heatmap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/api/layers/heatmap-layer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# HeatmapLayer

![](../../assets/duckdb-heatmap.jpg)

> Screenshot from [DuckDB Spatial](../../examples/duckdb) example
::: lonboard.HeatmapLayer
options:
inherited_members: true
243 changes: 243 additions & 0 deletions examples/duckdb.ipynb

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
- [Global boundaries ![](../assets/boundaries.png)](../examples/global-boundaries) using [`PolygonLayer`](../api/layers/polygon-layer)
- [U.S. County-to-County Migration ![](../assets/arc-layer-migration-example.gif)](../examples/migration) using [`ArcLayer`](../api/layers/arc-layer) and [`BrushingExtension`](../api/layer-extensions/brushing-extension)
- [Scatterplot with GPU data filtering ![](../assets/data-filter-extension.gif)](../examples/data-filter-extension) using [`ScatterplotLayer`](../api/layers/scatterplot-layer) and [`DataFilterExtension`](../api/layer-extensions/data-filter-extension)
- [Color picker integration ![](../assets/color-picker.jpg)](../examples/integrations/color-picker) using [`SolidPolygonLayer`](../api/layers/solid-polygon-layer)
- [JupyterLab Sidecar integration ![](../assets/jupyter-sidecar.jpg)](../examples/integrations/sidecar/) using [`ScatterplotLayer`](../api/layers/scatterplot-layer) and [`JupyterLab Sidecar`](https://github.com/jupyter-widgets/jupyterlab-sidecar)
- [Motor Vehicle Crashes in NYC ![](../assets/motor-vehicle-crashes-nyc.jpg)](../examples/map_challenge/1-points) using [`ScatterplotLayer`](../api/layers/scatterplot-layer)
- [Rivers in Asia ![](../assets/rivers-asia.jpg)](../examples/map_challenge/6-asia/) using [`PathLayer`](../api/layers/path-layer)

## Integrations

- [DuckDB Spatial ![](../assets/duckdb-heatmap.jpg)](../examples/duckdb) using [`HeatmapLayer`](../api/layers/heatmap-layer)
- [Color picker integration ![](../assets/color-picker.jpg)](../examples/integrations/color-picker) using [`SolidPolygonLayer`](../api/layers/solid-polygon-layer)
- [JupyterLab Sidecar integration ![](../assets/jupyter-sidecar.jpg)](../examples/integrations/sidecar/) using [`ScatterplotLayer`](../api/layers/scatterplot-layer) and [`JupyterLab Sidecar`](https://github.com/jupyter-widgets/jupyterlab-sidecar)

</div>

## Third-party showcase
Expand Down
6 changes: 3 additions & 3 deletions lonboard/_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1775,8 +1775,8 @@ def from_duckdb(
"""The weight of each object.
- Type: [FloatAccessor][lonboard.traits.FloatAccessor], optional
- If a number is provided, it is used as the outline width for all objects.
- If an array is provided, each value in the array will be used as the outline
width for the object at the same row index.
- If a number is provided, it is used as the weight for all objects.
- If an array is provided, each value in the array will be used as the weight
for the object at the same row index.
- Default: `1`.
"""
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ nav:
- examples/migration.ipynb
- examples/data-filter-extension.ipynb
- Integrations:
- examples/duckdb.ipynb
- ColorPicker: examples/integrations/color-picker.ipynb
- Sidecar: examples/integrations/sidecar.ipynb
- 30 Day Map Challenge:
Expand Down

0 comments on commit bdee1a5

Please sign in to comment.