Data Visualization using Bokeh:

In Python, Bokeh is a data visualization library which provides high-performance interactive charts and plots for Data Science. The output of Bokeh can be obtained using notebook, server, and html. It is also possible to embed bokeh plots in Django and flask apps.

In bokeh, there are two visualization interfaces for users:

  • models – It is a low level interface which provides high flexibility to application developers.
  • plotting – It is a high level interface for creation of visual glyphs.

So, in order to install the bokeh module we use the following code in the terminal:

pip install bokeh

So, the datasets which we need for generating bokeh graphs will be collected from Kaggle.

Code 1: Scatter Markers

For creation of scatter circle markers using circle() method.

Data Visualization using Bokeh in Python for Data Science - PST Analytics

OUTPUT:

Code 2: Single line

For creation of single line using line() method:

Data Visualization using Bokeh in Python for Data Science - PST Analytics

OUTPUT:

Code 3: Bar chart

A bar chart represents categorical data using rectangular bars. So, the length of the bars is directly proportional to the values.

OUTPUT:

Data Visualization using Bokeh in Python for Data Science - PST Analytics

Code 4: Box plot

A box plot is there for representing statistical data on a plot. It summarizes statistical properties of various data groups which are present in data.

Data Visualization using Bokeh in Python for Data Science - PST Analytics

OUTPUT:

Code 5: Histogram

It is there for representation of distribution of numerical data. So, in a histogram the rectangular height is directly proportional to the frequency of the values in the class interval.

OUTPUT:

Code 6: Scatter plot

It is there for plotting values of two variables in a dataset. So, it is there for finding correlation among the two variables selected.

OUTPUT:

So, to learn more about bokeh in python for data science, you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.