deck.gl

repository·master·Indexed 12 days ago

https://github.com/visgl/deck.gl

A high-performance, GPU-powered visualization framework for large-scale datasets using WebGL2 and WebGPU. It maps data to visual layers across various view projections and integrates with basemap providers like Maplibre, Google Maps, Mapbox, and Esri ArcGIS. The ecosystem includes pydeck for Python bindings and specialized layers such as Core, Geo, and Mesh layers.

Tokens
354.9K
Snippets
956
Records
1.6K
Agent score
96%

What's inside deck.gl

  1. Use Aggregation Layers for data binning and heatmaps

    master

    Aggregation Layers in deck.gl transform raw input data into alternative visual representations. Instead of rendering individual points, these layers group data into spatial bins or density maps.

    Available aggregation layers include:

    • ContourLayer: Visualizes density using contour lines.
    • GridLayer: Bins data into a rectangular grid.
    • HeatmapLayer: Renders a continuous density heatmap.
    • HexagonLayer: Bins data into hexagonal cells.
    • ScreenGridLayer: Bins data based on screen-space coordinates.
  2. Use @deck.gl/jupyter-widget in Jupyter notebooks

    master
    The @deck.gl/jupyter-widget package provides a Jupyter widget that allows you to render deck.gl visualizations directly within a Jupyter notebook environment. This enables interactive, high-performance geospatial visualizations inside your data science workflows.
  3. Use pydeck documentation helper scripts

    master

    The scripts/ directory contains helper utilities used to generate the pydeck documentation website:

    • embed_examples.py: Generates .rst files containing both the source code and an embedded example.
    • generate_grid_html.py: Creates the HTML landing page for the pydeck website, featuring a grid of links to .rst pages with thumbnails.
    • snap_thumbnails.py: Generates .png thumbnail images from the provided example Python files.
  4. Use deck.gl as a Google Maps overlay

    master
    The @deck.gl/google-maps module allows you to use deck.gl as a custom overlay on top of a Google Maps instance. This enables you to render high-performance deck.gl layers (like ScatterplotLayer, PathLayer, etc.) synchronized with the Google Maps camera movement and zoom levels.
  5. Use pydeck for spatial visualizations in Python

    master
    pydeck is a set of Python bindings for deck.gl, specifically optimized for Jupyter environments. It allows you to create large-scale, interactive spatial visualizations using Python code. You can define layers, set view states (camera position/zoom), and render the results either directly in a notebook or as standalone HTML files.
  6. Use @deck.gl/extensions for optional layer functionalities

    master
    @deck.gl/extensions provides optional functionalities that can be added to deck.gl layers to enhance their capabilities. These extensions are not part of the core library and must be installed separately if you require the specific features they provide.
  7. Use deck.gl layers as custom Mapbox layers

    master
    The @deck.gl/mapbox module allows you to use deck.gl layers as custom layers within a Mapbox GL JS map. This enables seamless interleaving of Mapbox layers (like terrain, labels, or satellite imagery) and deck.gl layers, allowing them to coexist in the same visual space.
  8. Share WebGL resources between TensorFlow.js and deck.gl

    master

    This experimental project demonstrates how to share WebGL resources directly between TensorFlow.js and deck.gl to avoid expensive CPU-GPU data transfers. It provides two primary demonstration patterns:

    1. Histogram Pattern: TensorFlow.js performs bin counting on the GPU. The resulting output is copied to a Buffer which is then passed to a GridCellLayer in deck.gl.
    2. Spectrogram Pattern: TensorFlow.js performs a Short-time Fourier transform (STFT) on the GPU. The output is rendered as an image using a custom BitmapLayer in deck.gl.

    To use this in your own project, copy the contents of this folder into your project directory.

    # To run the existing demos, follow the setup steps below.
  9. Explore the deck.gl examples catalog

    master

    The deck.gl repository provides several categories of examples depending on your needs:

    • Get-Started Examples: Minimal setups for getting deck.gl and a base map working together.
      • Pure JS: Framework-agnostic applications bundled with Vite.
      • React: Uses @deck.gl/react and react-map-gl, bundled with Vite.
      • Scripting: Single-file HTML examples that run directly in a browser.
    • Website Examples: Stand-alone versions of the examples found on the official deck.gl website, using smaller data sets for easier study.
    • Playground: Demonstrates declarative layer definitions using @deck.gl/json.
    • Scripting Gallery: Showcases scripting with pre-bundled deck.gl modules.
    • Layer Browser: A tool for testing props for all official layers and effects.
    • Experimental Examples: Showcases experimental features or proposed API implementations for advanced users.
  10. Use @deck.gl/widgets for UI controls

    master
    @deck.gl/widgets provides DOM-based UI components and controls designed to integrate seamlessly with deck.gl visualizations. These widgets allow you to add common user interface elements (like buttons, sliders, or legends) that can interact with your deck.gl layers and camera state.
  11. Use @deck.gl/layers for layer definitions

    master
    The @deck.gl/layers package serves as the core layer catalog for deck.gl. It contains the standard layer implementations used to visualize different types of geospatial data (e.g., ScatterplotLayer, LineLayer, GeoJsonLayer, etc.) within a deck.gl Deck instance.