Bokeh¶
Bokeh is an interactive visualisation library for modern web browsers. Its goal is to provide versatile graphics and extend this capability to very large and streaming datasets through high-performance interactivity. Bokeh is useful for quickly and easily creating interactive charts, dashboards and data applications.
To provide both simple and powerful and flexible features required for extensible customisation, Bokeh provides two interfaces:
- bokeh.models
Low-level interface that offers application developers the greatest possible flexibility
- bokeh.plotting
High-level interface for the creation of visual glyphs
See also
Installation¶
With Spack you can deploy Bokeh in your kernel, for example with:
$ spack env activate python-311
$ spack install py-bokeh
Alternatively, you can also install Bokeh with other package managers, for example
$ pipenv install bokeh
Optional extensions¶
There are extensions for Bokeh for the following functions:
- NodeJS
Necessary to extend Bokeh or to define
CustomJS
implementations in CoffeeScript or TypeScript- pandas
Necessary for the Hexbin function. Some applications are simplified by using pandas, for example pandas DataFrames are automatically converted to Bokeh data sources by Glyph functions
- Psutil
Required to enable detailed memory logging in the Bokeh server
- NetworkX
With
from_networkx
, the bokeh diagram renderer can be applied directly to NetworkX data- Selenium, PhantomJS
Necessary for exporting plots to PNG and SVG images
Examples¶
When installing with pip
, the examples are not installed. However, you can
clone the Git repository and look at the examples/ directory to see the
examples
.
Most of these examples use sample data, which must also be provided separately. To download these files, simply enter the following:
$ pipenv run bokeh sampledata