docstr: This is the renderer and configuration for a deck.gl visualization, similar to the
  `Deck <https://deck.gl/docs/api-reference/core/deck>`_ class from deck.gl.
  Pass `Deck` a Mapbox API token to display a basemap; see the notes below.
  
  Parameters
  ----------
  
  layers : pydeck.Layer or list of pydeck.Layer, default None
      List of :class:`pydeck.bindings.layer.Layer` layers to render.
  views : list of pydeck.View, default ``[pydeck.View(type="MapView", controller=True)]``
      List of :class:`pydeck.bindings.view.View` objects to render.
  api_keys : dict, default None
      Dictionary of geospatial API service providers, where the keys are ``mapbox``, ``google_maps``, or ``carto``
      and the values are the API key. Defaults to None if not set. Any of the environment variables
      ``MAPBOX_API_KEY``, ``GOOGLE_MAPS_API_KEY``, and ``CARTO_API_KEY`` can be set instead of hardcoding the key here.
  map_provider : str, default 'carto'
      If multiple API keys are set (e.g., both Mapbox and Google Maps), inform pydeck which basemap provider to prefer.
      Values can be ``carto``, ``mapbox`` or ``google_maps``
  map_style : str or dict, default 'dark'
      One of 'light', 'dark', 'road', 'satellite', 'dark_no_labels', and 'light_no_labels', a URI for a basemap
      style, which varies by provider, or a dict that follows the Mapbox style `specification <https://docs.mapbox.com/mapbox-gl-js/style-spec/>`.
      The default is Carto's Dark Matter map. For Mapbox examples, see  Mapbox's `gallery <https://www.mapbox.com/gallery/>`.
      If not using a basemap, set ``map_provider=None``.
  initial_view_state : pydeck.ViewState, default ``pydeck.ViewState(latitude=0, longitude=0, zoom=1)``
      Initial camera angle relative to the map, defaults to a fully zoomed out 0, 0-centered map
      To compute a viewport from data, see :func:`pydeck.data_utils.viewport_helpers.compute_view`
  height : int, default 500
      Height of Jupyter notebook cell, in pixels.
  width : int` or string, default '100%'
      Width of visualization, in pixels (if a number) or as a CSS value string.
  tooltip : bool or dict of {str: str}, default True
      If ``True``/``False``, toggles a default tooltip on visualization hover.
      Layers must have ``pickable=True`` set in order to display a tooltip.
      For more advanced usage, the user can pass a dict to configure more custom tooltip features.
      Further documentation is `here <tooltip.html>`_.
  
  .. _Deck:
      https://deck.gl/docs/api-reference/core/deck
  .. _gallery:
      https://www.mapbox.com/gallery/
docstr_tok: ["This","is","the","renderer","and","configuration","for","a","deck.gl","visualization",",","similar","to","the","`","Deck","<","https",":","\/\/deck.gl\/docs\/api-reference\/core\/deck",">","`","_","class","from","deck.gl",".","Pass","`","Deck","`","a","Mapbox","API","token","to","display","a","basemap",";","see","the","notes","below",".","Parameters","--","--","--","--","--","layers",":","pydeck.Layer","or","list","of","pydeck.Layer",",","default","None","List","of",":","class",":","`","pydeck.bindings.layer.Layer","`","layers","to","render",".","views",":","list","of","pydeck.View",",","default","``","[","pydeck.View","(","type=","''","MapView","''",",","controller=True",")","]","``","List","of",":","class",":","`","pydeck.bindings.view.View","`","objects","to","render",".","api_keys",":","dict",",","default","None","Dictionary","of","geospatial","API","service","providers",",","where","the","keys","are","``","mapbox","``",",","``","google_maps","``",",","or","``","carto","``","and","the","values","are","the","API","key",".","Defaults","to","None","if","not","set",".","Any","of","the","environment","variables","``","MAPBOX_API_KEY","``",",","``","GOOGLE_MAPS_API_KEY","``",",","and","``","CARTO_API_KEY","``","can","be","set","instead","of","hardcoding","the","key","here",".","map_provider",":","str",",","default","'carto'","If","multiple","API","keys","are","set","(","e.g.",",","both","Mapbox","and","Google","Maps",")",",","inform","pydeck","which","basemap","provider","to","prefer",".","Values","can","be","``","carto","``",",","``","mapbox","``","or","``","google_maps","``","map_style",":","str","or","dict",",","default","'dark'","One","of","'light","'",",","'dark","'",",","'road","'",",","'satellite","'",",","'dark_no_labels","'",",","and","'light_no_labels","'",",","a","URI","for","a","basemap","style",",","which","varies","by","provider",",","or","a","dict","that","follows","the","Mapbox","style","`","specification","<","https",":","\/\/docs.mapbox.com\/mapbox-gl-js\/style-spec\/",">","`",".","The","default","is","Carto","'s","Dark","Matter","map",".","For","Mapbox","examples",",","see","Mapbox","'s","`","gallery","<","https",":","\/\/www.mapbox.com\/gallery\/",">","`",".","If","not","using","a","basemap",",","set","``","map_provider=None","``",".","initial_view_state",":","pydeck.ViewState",",","default","``","pydeck.ViewState","(","latitude=0",",","longitude=0",",","zoom=1",")","``","Initial","camera","angle","relative","to","the","map",",","defaults","to","a","fully","zoomed","out","0",",","0-centered","map","To","compute","a","viewport","from","data",",","see",":","func",":","`","pydeck.data_utils.viewport_helpers.compute_view","`","height",":","int",",","default","500","Height","of","Jupyter","notebook","cell",",","in","pixels",".","width",":","int","`","or","string",",","default","'100","%","'","Width","of","visualization",",","in","pixels","(","if","a","number",")","or","as","a","CSS","value","string",".","tooltip",":","bool","or","dict","of","{","str",":","str","}",",","default","True","If","``","True","``","\/","``","False","``",",","toggles","a","default","tooltip","on","visualization","hover",".","Layers","must","have","``","pickable=True","``","set","in","order","to","display","a","tooltip",".","For","more","advanced","usage",",","the","user","can","pass","a","dict","to","configure","more","custom","tooltip","features",".","Further","documentation","is","`","here","<","tooltip.html",">","`","_",".","..","_Deck",":","https",":","\/\/deck.gl\/docs\/api-reference\/core\/deck","..","_gallery",":","https",":","\/\/www.mapbox.com\/gallery\/"]
code: def __init__(
      self,
      layers=None,
      views=[View(type="MapView", controller=True)],
      map_style=DARK,
      api_keys=None,
      initial_view_state=ViewState(latitude=0, longitude=0, zoom=1),
      width="100%",
      height=500,
      tooltip=True,
      description=None,
      effects=None,
      map_provider=BaseMapProvider.CARTO.value,
      parameters=None,
  ):
      """This is the renderer and configuration for a deck.gl visualization, similar to the
      `Deck <https://deck.gl/docs/api-reference/core/deck>`_ class from deck.gl.
      Pass `Deck` a Mapbox API token to display a basemap; see the notes below.
  
      Parameters
      ----------
  
      layers : pydeck.Layer or list of pydeck.Layer, default None
          List of :class:`pydeck.bindings.layer.Layer` layers to render.
      views : list of pydeck.View, default ``[pydeck.View(type="MapView", controller=True)]``
          List of :class:`pydeck.bindings.view.View` objects to render.
      api_keys : dict, default None
          Dictionary of geospatial API service providers, where the keys are ``mapbox``, ``google_maps``, or ``carto``
          and the values are the API key. Defaults to None if not set. Any of the environment variables
          ``MAPBOX_API_KEY``, ``GOOGLE_MAPS_API_KEY``, and ``CARTO_API_KEY`` can be set instead of hardcoding the key here.
      map_provider : str, default 'carto'
          If multiple API keys are set (e.g., both Mapbox and Google Maps), inform pydeck which basemap provider to prefer.
          Values can be ``carto``, ``mapbox`` or ``google_maps``
      map_style : str or dict, default 'dark'
          One of 'light', 'dark', 'road', 'satellite', 'dark_no_labels', and 'light_no_labels', a URI for a basemap
          style, which varies by provider, or a dict that follows the Mapbox style `specification <https://docs.mapbox.com/mapbox-gl-js/style-spec/>`.
          The default is Carto's Dark Matter map. For Mapbox examples, see  Mapbox's `gallery <https://www.mapbox.com/gallery/>`.
          If not using a basemap, set ``map_provider=None``.
      initial_view_state : pydeck.ViewState, default ``pydeck.ViewState(latitude=0, longitude=0, zoom=1)``
          Initial camera angle relative to the map, defaults to a fully zoomed out 0, 0-centered map
          To compute a viewport from data, see :func:`pydeck.data_utils.viewport_helpers.compute_view`
      height : int, default 500
          Height of Jupyter notebook cell, in pixels.
      width : int` or string, default '100%'
          Width of visualization, in pixels (if a number) or as a CSS value string.
      tooltip : bool or dict of {str: str}, default True
          If ``True``/``False``, toggles a default tooltip on visualization hover.
          Layers must have ``pickable=True`` set in order to display a tooltip.
          For more advanced usage, the user can pass a dict to configure more custom tooltip features.
          Further documentation is `here <tooltip.html>`_.
  
      .. _Deck:
          https://deck.gl/docs/api-reference/core/deck
      .. _gallery:
          https://www.mapbox.com/gallery/
      """
      self.layers = []
      if isinstance(layers, Layer):
          self.layers.append(layers)
      else:
          self.layers = layers or []
      self.views = views
      # Use passed view state
      self.initial_view_state = initial_view_state
  
      api_keys = api_keys or {}
  
      self.description = description
      self.effects = effects
      self.map_provider = (
          str(map_provider).lower() if map_provider else None
      )
      self._tooltip = tooltip
  
      if has_jupyter_extra():
          from ..widget import DeckGLWidget
  
          self.deck_widget = DeckGLWidget()
          self.deck_widget.custom_libraries = (
              pydeck_settings.custom_libraries
          )
          self.deck_widget.configuration = pydeck_settings.configuration
  
          self.deck_widget.height = height
          self.deck_widget.width = width
          self.deck_widget.tooltip = tooltip
          self.deck_widget.map_provider = map_provider
  
      self._set_api_keys(api_keys)
  
      custom_map_style_error = "The map_provider parameter must be 'mapbox' when map_style is provided as a dict."
  
      if isinstance(map_style, dict):
          assert (
              map_provider == BaseMapProvider.MAPBOX.value
          ), custom_map_style_error
          self.map_style = map_style
      else:
          self.map_style = get_from_map_identifier(
              map_style, map_provider
          )
  
      self.parameters = parameters
  
file_path: deck.gl/bindings/pydeck/pydeck/bindings/deck.py
imports: import os
  import sys
  from .json_tools import JSONMixin
  from .layer import Layer
  from ..io.html import deck_to_html
  from ..settings import settings
  from .view import View
  from .view_state import ViewState
  from .base_map_provider import BaseMapProvider
  from .map_styles import DARK, get_from_map_identifier
label_desc: Use image node_id 1 to create a new Deck object from inherited base classes: JSONMixin with example: obj = Deck(layers, views, map_style, api_keys, initial_view_state, width, height, tooltip, description, effects, map_provider, parameters)