Reader small image

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

Product typeBook
Published inJun 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781789135404
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Kevin Jolly
Kevin Jolly
author image
Kevin Jolly

Kevin Jolly is a formally educated data scientist with a master's degree in data science from the prestigious King's College London. Kevin works as a statistical analyst with a digital healthcare start-up, Connido Limited, in London, where he is primarily involved in leading the data science projects that the company undertakes. He has built machine learning pipelines for small and big data, with a focus on scaling such pipelines into production for the products that the company has built. Kevin is also the author of a book titled Hands-On Data Visualization with Bokeh, published by Packt. He is the editor-in-chief of Linear, a weekly online publication on data science software and products.
Read more about Kevin Jolly

Right arrow

Visualizing geographic data with Bokeh

In this section, we are going to create a Bokeh visualization for the states in the USA that have the lowest crime rates. In order to do this, we will render a map of the USA and pinpoint the states that have the lowest crime rates.

The first step is to import the required packages:

from bokeh.sampledata import us_states
from bokeh.plotting import figure, show, output_file
from bokeh.models import HoverTool

us_states is a dictionary containing all the information that we need to construct a map of the USA in Bokeh. Additionally, if you wanted to create a map of any other country in Bokeh, you can find the necessary geo data on the web and import the file into your Jupyter Notebook.

The next step is to copy the data into Bokeh so that we can modify the data and delete states that are not significant (if required). Here, we will be deleting...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Data Visualization with Bokeh
Published in: Jun 2018Publisher: PacktISBN-13: 9781789135404

Author (1)

author image
Kevin Jolly

Kevin Jolly is a formally educated data scientist with a master's degree in data science from the prestigious King's College London. Kevin works as a statistical analyst with a digital healthcare start-up, Connido Limited, in London, where he is primarily involved in leading the data science projects that the company undertakes. He has built machine learning pipelines for small and big data, with a focus on scaling such pipelines into production for the products that the company has built. Kevin is also the author of a book titled Hands-On Data Visualization with Bokeh, published by Packt. He is the editor-in-chief of Linear, a weekly online publication on data science software and products.
Read more about Kevin Jolly