panel.pane.deckgl module#

Defines a PyDeck Pane which renders a PyDeck plot using a PyDeckPlot bokeh model.

class panel.pane.deckgl.DeckGL(object=None, **params)[source]#

Bases: ModelPane

The DeckGL pane renders the Deck.gl JSON specification as well as PyDeck plots inside a panel.

Deck.gl is a very powerful WebGL-powered framework for visual exploratory data analysis of large datasets.

Reference: https://panel.holoviz.org/reference/panes/DeckGL.html

Example:

>>> pn.extension('deckgl')
>>> DeckGL(
...    some_deckgl_dict_or_pydeck_object,
...    mapbox_api_key=MAPBOX_KEY, height=600
... )
Attributes:
priority

Methods

applies(obj)

Returns boolean or float indicating whether the Pane can render the object.

is_pydeck

Parameter Definitions


Parameters inherited from:

panel.viewable.Layoutable: align, aspect_ratio, css_classes, design, height, min_width, min_height, max_width, max_height, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visible

panel.viewable.Viewable: loading

panel.pane.base.PaneBase: margin, default_layout, object

mapbox_api_key = String(allow_None=True, label='Mapbox api key')

The MapBox API key if not supplied by a PyDeck object.

tooltips = ClassSelector(class_=(<class 'bool'>, <class 'dict'>), default=True, label='Tooltips')

Whether to enable tooltips

configuration = String(default='', label='Configuration')

Custom configuration dictionary as json string

click_state = Dict(class_=<class 'dict'>, default={}, label='Click state')

Contains the last click event on the DeckGL plot.

hover_state = Dict(class_=<class 'dict'>, default={}, label='Hover state')

The current hover state of the DeckGL plot.

view_state = Dict(class_=<class 'dict'>, default={}, label='View state')

The current view state of the DeckGL plot.

throttle = Dict(class_=<class 'dict'>, default={'view': 200, 'hover': 200}, label='Throttle')

Throttling timeout (in milliseconds) for view state and hover events sent from the frontend.

classmethod applies(obj: Any) float | bool | None[source]#

Returns boolean or float indicating whether the Pane can render the object.

If the priority of the pane is set to None, this method may also be used to define a float priority depending on the object being rendered.

priority: ClassVar[float | bool | None] = None#
panel.pane.deckgl.lower_camel_case_keys(attrs)[source]#

Makes all the keys in a dictionary camel-cased and lower-case

Parameters:
attrsdict

Dictionary for which all the keys should be converted to camel-case

panel.pane.deckgl.to_camel_case(snake_case: str) str[source]#

Makes a snake case string into a camel case one

Parameters:
snake_casestr

Snake-cased string (e.g., ā€œsnake_casedā€) to be converted to camel-case (e.g., ā€œcamelCaseā€)