Skip to main content

Yet another Jupyter widget for deck.gl

Project description

ipydeck

PyPI

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

Features

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipydeck-0.4.2.tar.gz (670.3 kB view hashes)

Uploaded Source

Built Distribution

ipydeck-0.4.2-py3-none-any.whl (675.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page