Creating an insightful visualization
Now that we have a fundamental idea of what our data contains, we can proceed to making the visualization. The first step is to ensure we have the foundation of the visualization ready.
Creating the base plot
The foundation consists of the base plot that you want to visualize. In our case, we want to see how the volume of stocks traded over a period of time correlates with the high prices. In order to build this application, we use the code shown here:
#Import the required packages from bokeh.io import curdoc from bokeh.models import ColumnDataSource from bokeh.plotting import figure import pandas as pd #Read the data into the notebook df = pd.read_csv('all_stocks_5yr.csv') #Convert the date column to a datetime object and extract the year only. df['date'] = pd.to_datetime(df['date']).apply(lambda x:x.strftime('%Y')) #Create the ColumnDataSource Object data = ColumnDataSource(data = { 'high' : df[df['date'] == '2013'].high, 'low' : df[df...