An open API service indexing awesome lists of open source software.

https://github.com/ozekik/ipydeck

Yet another Jupyter widget for deck.gl
https://github.com/ozekik/ipydeck

anywidget deck-gl deckgl geospatial geospatial-analysis geospatial-visualization jupyter

Last synced: 24 days ago
JSON representation

Yet another Jupyter widget for deck.gl

Awesome Lists containing this project

README

        

# ipydeck

[![PyPI](https://img.shields.io/pypi/v/ipydeck.svg)](https://pypi.org/project/ipydeck/)

`ipydeck` is yet another Jupyter widget for [deck.gl](https://deck.gl/), built on [anywidget](https://github.com/manzt/anywidget/).

## Features

- Supports wider range of deck.gl layers
- Including additional `BitmapTileLayer`
- Supports updating layers

## Installation

```sh
pip install ipydeck
```

## Usage

From :

```py
from ipydeck import Deck, Layer, ViewState

layers = [
Layer(
type="GeoJsonLayer",
data="https://raw.githubusercontent.com/visgl/deck.gl-data/master/examples/geojson/vancouver-blocks.json",
opacity=0.8,
stroked=False,
filled=True,
extruded=True,
wireframe=True,
elevation_scale=0.1,
get_elevation="@@=properties.valuePerSqm",
get_fill_color=[199, 233, 180],
get_line_color=[255, 255, 255],
)
]

view_state = ViewState(
latitude=49.254, longitude=-123.13, zoom=11, max_zoom=16, pitch=45, bearing=0
)

deck = Deck(
layers=layers,
initial_view_state=view_state,
map_style="light",
)

deck
``````

![screenshot](https://raw.githubusercontent.com/ozekik/ipydeck/master/assets/screenshot.png)

## Alternatives

- [pydeck](https://deckgl.readthedocs.io/)
- [lonboard](https://github.com/developmentseed/lonboard/)

## License

MIT