Visualizing data
We can use popular Python libraries such as Bokeh, Matplotlib, and Plotly to make visualizations in Azure Databricks. In this section, we will learn how we can use these libraries in Azure Databricks and how we can make use of notebook features to work with these visualizations.
Bokeh
Bokeh is a Python interactive data visualization library used to create beautiful and versatile graphics, dashboards, and plots.
To use Bokeh, you can install the Bokeh PyPI
package either by installing it at the cluster level through the libraries UI and attaching it to your cluster or by installing it at the notebook level using pip
commands.
Once we have installed the library and we can import it into our notebook, to display a Bokeh plot in Databricks, we must first create the plot and generate an HTML file embedded with the data for the plot, created, for example, by using Bokeh's file_html
or output_file
functions, and then pass this HTML to the Databricks displayHTML...