Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords high-performance interactivity over large or streaming datasets.
We will start by installing and importing the library in Python.
Bokeh can be installed using python package manager pip as follows:
pip install bokeh
Starting from this section onwards, we will be using Jupyter Notebooks as our Python IDE.
To import Bokeh in Python, write the following code and run it:
# Libraries/Modules import conventions from bokeh.io import output_notebook, show from bokeh.plotting import figure, output_file, show
import bokeh.sampledata # To download sample data for visualization bokeh.sampledata.download()
To check the version of the installed Bokeh library, write the following code and run it:
# Check version of bokeh installed print(bokeh.__version__) # version:1.4.0
This is it for the basic installation of Bokeh in Python. You are now ready to start plotting your own plots in Python.