Hands-On Data Visualization with Bokeh

Book description

Learn how to create interactive and visually aesthetic plots using the Bokeh package in Python

About This Book
  • A step by step approach to creating interactive plots with Bokeh
  • Go from nstallation all the way to deploying your very own Bokeh application
  • Work with a real time datasets to practice and create your very own plots and applications
Who This Book Is For

This book is well suited for data scientists and data analysts who want to perform interactive data visualization on their web browsers using Bokeh. Some exposure to Python programming will be helpful, but prior experience with Bokeh is not required.

What You Will Learn
  • Installing Bokeh and understanding its key concepts
  • Creating plots using glyphs, the fundamental building blocks of Bokeh
  • Creating plots using different data structures like NumPy and Pandas
  • Using layouts and widgets to visually enhance your plots and add a layer of interactivity
  • Building and hosting applications on the Bokeh server
  • Creating advanced plots using spatial data
In Detail

Adding a layer of interactivity to your plots and converting these plots into applications hold immense value in the field of data science. The standard approach to adding interactivity would be to use paid software such as Tableau, but the Bokeh package in Python offers users a way to create both interactive and visually aesthetic plots for free. This book gets you up to speed with Bokeh - a popular Python library for interactive data visualization.

The book starts out by helping you understand how Bokeh works internally and how you can set up and install the package in your local machine. You then use a real world data set which uses stock data from Kaggle to create interactive and visually stunning plots. You will also learn how to leverage Bokeh using some advanced concepts such as plotting with spatial and geo data. Finally you will use all the concepts that you have learned in the previous chapters to create your very own Bokeh application from scratch.

By the end of the book you will be able to create your very own Bokeh application. You will have gone through a step by step process that starts with understanding what Bokeh actually is and ends with building your very own Bokeh application filled with interactive and visually aesthetic plots.

Style and approach

This books take you through a step by step process that starts with understanding what Bokeh actually is and ends with building your very own Bokeh application filled with interactive and visually aesthetic plots that will amaze your users.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Data Visualization with Bokeh
  3. Dedication
  4. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Code in action
      4. Conventions used
    4. Get in touch
      1. Reviews
  7. Bokeh Installation and Key Concepts
    1. Technical requirements
    2. The difference between static and interactive plotting
    3. Installing the Bokeh library
      1. Installing Bokeh using a Python distribution
    4. Verifying your installation
    5. When things go wrong
    6. Key concepts and the building blocks of Bokeh
      1. Plot outputs
    7. Summary
  8. Plotting using Glyphs
    1. Technical requirements
    2. What are glyphs?
    3. Plotting with glyphs
      1. Creating line plots
      2. Creating bar plots
      3. Creating patch plots
      4. Creating scatter plots
    4. Customizing glyphs
    5. Summary
  9. Plotting with different Data Structures
    1. Technical requirements
    2. Creating plots using NumPy arrays 
      1. Creating line plots using NumPy arrays
      2. Creating scatter plots using NumPy arrays
    3. Creating plots using pandas DataFrames
      1. Creating a time series plot using a pandas DataFrame
      2. Creating scatter plots using a pandas DataFrame
    4. Creating plots with ColumnDataSource 
      1. Creating a time series plot using the ColumnDataSource
      2. Creating a scatter plot using the ColumnDataSource
    5. Summary
  10. Using Layouts for Effective Presentation
    1. Technical requirements
    2. Creating multiple plots along the same row
    3. Creating multiple plots in the same column
    4. Creating multiple plots in a row and column
    5. Creating multiple plots using a tabbed layout
    6. Creating a robust grid layout
    7. Linking multiple plots together
    8. Summary
  11. Using Annotations, Widgets, and Visual Attributes for Visual Enhancement
    1. Technical requirements
    2. Creating annotations to convey supplemental information
      1. Adding titles to plots
      2. Adding legends to plots
      3. Adding color maps to plots
    3. Creating widgets to add interactivity to plots
      1. Creating a button widget
      2. Creating the checkbox widget
      3. Creating a drop-down menu widget
      4. Creating the radio button widget
      5. Creating a slider widget
      6. Creating a text input widget
    4. Creating visual attributes to enhance style and interactivity
      1. Attributes that add interactivity to the plot
        1. Creating a hover tooltip
        2. Creating selections
      2. Attributes that enhance the visual style of the plot
        1. Styling the title 
        2. Styling the background
        3. Styling the outline of the plot
        4. Styling the labels
    5. Summary
  12. Building and Hosting Applications Using the Bokeh Server
    1. Technical requirements
    2. Introduction to the Bokeh Server
    3. Building a Bokeh application
      1. Creating a single slider application
      2. Creating a multi-slider application
      3. Combining the slider application with a scatter plot
      4. Combining the slider application with a line plot
      5. Creating an application with the select widget
      6. Creating an application with the button widget
      7. Creating an application to select different columns
    4. Introduction to deploying the Bokeh application
    5. Summary
  13. Advanced Plotting with Networks, Geo Data, WebGL, and Exporting Plots
    1. Technical requirements
    2. Using Bokeh to visualize networks
      1. Visualizing networks with straight paths
      2. Visualizing networks with explicit paths
    3. Visualizing geographic data with Bokeh
    4. Using WebGL to improve performance
    5. Exporting plots as PNG images
    6. Summary
  14. The Bokeh Workflow – A Case Study
    1. Technical requirements
    2. Asking the right question
    3. The exploratory data analysis 
    4. Creating an insightful visualization
      1. Creating the base plot
      2. Mapping tech stocks
      3. Adding a hover tool
      4. Improving performance using WebGL
    5. Presenting your results
    6. Summary
  15. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Hands-On Data Visualization with Bokeh
  • Author(s): Kevin Jolly
  • Release date: June 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789135404