Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Data Visualization with Bokeh

You're reading from  Hands-On Data Visualization with Bokeh

Product type Book
Published in Jun 2018
Publisher Packt
ISBN-13 9781789135404
Pages 174 pages
Edition 1st Edition
Languages
Author (1):
Kevin Jolly Kevin Jolly
Profile icon Kevin Jolly

Table of Contents (10) Chapters

Preface 1. Bokeh Installation and Key Concepts 2. Plotting using Glyphs 3. Plotting with different Data Structures 4. Using Layouts for Effective Presentation 5. Using Annotations, Widgets, and Visual Attributes for Visual Enhancement 6. Building and Hosting Applications Using the Bokeh Server 7. Advanced Plotting with Networks, Geo Data, WebGL, and Exporting Plots 8. The Bokeh Workflow – A Case Study 9. Other Books You May Enjoy

Creating multiple plots along the same row

In order to create multiple plots along the same row, let's first create three unique plots. We will be working with the S&P 500 stock data found on Kaggle (https://www.kaggle.com/camnugent/sandp500/data).

The first step is to read the data and filter it so that we only use the data related to Apple as shown here:

#Import the required packages

import pandas as pd

#Read in the data

df = pd.read_csv('all_stocks_5yr.csv')

#Convert the date column into datetime data type

df['date'] = pd.to_datetime(df['date'])

#Filter the data for Apple stocks only

df_apple = df[df['Name'] == 'AAL']

Next, let's construct three unique plots using the code as shown here:

#Import the required packages

from bokeh.io import output_file, show
from bokeh.plotting import figure
from bokeh.plotting import ColumnDataSource...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}