Skip to content

Instantly share code, notes, and snippets.

@exactlyallan
Created July 1, 2020 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exactlyallan/c5c5b6cb8ea286d950871b13c24b9f8a to your computer and use it in GitHub Desktop.
Save exactlyallan/c5c5b6cb8ea286d950871b13c24b9f8a to your computer and use it in GitHub Desktop.

Browser Rendering from Python

Unless otherwise stated, there is not any currently direct connection to any of the tools below and GPU computing. Any GPU results generated via Numba, CuDF, etc. could be fed to the various APIs manually after exfiltrating to CPU memory.

Altair

Altair is based upon Vega-Lite and is especially tilted towards statistical data visualization and exploratory data analysis. Notably, Altair is only supported in notebook environments.

There is not any direct connection to Altair and GPU rendering. Due to the underlying Vega implementation, there is not currently any WebGL support (there is some experimental work to add WebGL to vega but status is not clear).

Bokeh

Bokeh is a Python library for generating interactive 2d visualization for modern web browsers. Its client library (BokehJS) is currently primarily based on the HTML 5 Canvas but can also generate SVG output.

Bokeh has limited support for GPU Rendering via WebGL support for scatters and lines. There is interest to extend this support to additional glyphs (e.g. rects and (multi-)polygons). There is also interest in affording server-side rendering in Node which could permit using OpenGL rendering on data sets larger than could fit in-browser.

There is interest in exploring GPU computing via rapids-js:

  • as a mechanism for performing some BokehJS library operations more efficiently,
  • to expose rapids-js as a tool users can utilize directly in their own CustomJS callbacks.

Plotly

Plotly is a Python library for generating interactive 2d and 3d visualization for modern web browsers. It has va

Plotly has limited support for GPU Rendering via WebGL options for scatters and lines, as well as its 3d plot options. The ReGL library is used for 2d webgl options.

bqplot

bqplot is a 2-D visualization system for Jupyter, based on the constructs of the Grammar of Graphics.

bqplot appears to have limited support for GPU Rendering via WebGL support for scatters only.

pythreejs

pythreejs is a Python / ThreeJS bridge. pythreejs is based on ipywidgets, so is only supported notebook environments.

pythreejs uses only GPU Rendering via the ThreeJS library.

pythreejs does appear to have some support for GPU compute via a GPUComputationRenderer class.

GPU Compute

Datashader

Datashader is server-side library for flexible graphics pipeline rendering.

Datashader can utilize GPU compute via CuDF and Dask Dataframe support. There is also interest to add cuspatial support to the spatialpandas library that is used internally.

Holoviews

Holoview is a high-level tool for organizing data for visualization, that drives external tools (Altair, Bokeh, MPL, Plotly) for actual visualization.

Holoviews can utilize GPU compute via CuDF and Dask Dataframe support. There is also interest to add cuspatial support to the spatialpandas library that is used internally.

Vaex

Vaex is a python library for lazy Out-of-Core DataFrames, to visualize and explore big tabular datasets.

Vaex can utilize GPU compute for for UDFs/virtual columns, via Numba jit_cuda.

JS libraries

Echarts

Echarts is a JS library created and supported by Badu. Echarts supports server-side rendering for larger data sets, and is tilted towards working very well in responsive web design sitatations.

Echarts has some support for GPU rendering via an echarts-gl extension for "3D plots, globe visualization and WebGL acceleration"

Highcharts

Highcharts has some support for GPU rendering via an optional "Boost" module that can leverage WebGL for scatters, lines, rects, and areas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment