ozekik / ipydeck

Yet another Jupyter widget for deck.gl
MIT License
3 stars 0 forks source link
anywidget deck-gl deckgl geospatial geospatial-analysis geospatial-visualization jupyter

ipydeck

PyPI

ipydeck is yet another Jupyter widget for deck.gl, built on anywidget.

Features

Installation

pip install ipydeck

Usage

From https://deck.gl/playground:

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

Alternatives

License

MIT