Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
      You have completed Data Visualization with Bokeh!
      
    
You have completed Data Visualization with Bokeh!
Preview
    
      
  Bokeh is a popular Python data visualization library. Let's talk a little about Bokeh and what's going to be covered in this course.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
                      [MUSIC]
                      0:00
                    
                    
                      Hello, I'm Ken.
                      0:04
                    
                    
                      In this course, I'm excited to introduce
you to the Python library, Bokeh.
                      0:07
                    
                    
                      Bokeh is a Python interactive
visualization library
                      0:12
                    
                    
                      that targets modern web browsers for
presentation.
                      0:16
                    
                    
                      Without using a dedicated Python
library power visualizations,
                      0:19
                    
                    
                      we might rely on a non-Python library,
such as D3.js for our work.
                      0:24
                    
                    
                      Not that there is anything wrong
with D3.js, it is a great and
                      0:29
                    
                    
                      powerful JavaScript library.
                      0:32
                    
                    
                      However, since we are working in
Python already for data processing,
                      0:34
                    
                    
                      it seems to make sense to stick with
our one language if we're able to.
                      0:39
                    
                    
                      Behind the scenes, Bokeh generates
the JavaScript, HTML, and CSS for us.
                      0:43
                    
                    
                      Therefore, instead of having to manage
multiple languages and libraries,
                      0:49
                    
                    
                      Bokeh consolidates it into one,
relatively easy step.
                      0:54
                    
                    
                      Bokeh allows for
interactive data visualization,
                      1:00
                    
                    
                      so that users can explore data themselves.
                      1:03
                    
                    
                      This is one reason why I like it
better than libraries like Matplotlib,
                      1:06
                    
                    
                      which has been used for a long time for
more basic plotting and charts.
                      1:10
                    
                    
                      Data visualization is an important part
of a variety of developer roles today.
                      1:15
                    
                    
                      Whether you're doing pie charts in Excel,
or
                      1:20
                    
                    
                      graphing time series data
from a scientific experiment,
                      1:22
                    
                    
                      how you present your data can make a large
impact on how people understand the data.
                      1:26
                    
                    
                      What's important about that,
you might ask.
                      1:31
                    
                    
                      Well, think about what happens when
you add a bar chart to a spreadsheet
                      1:34
                    
                    
                      to quickly determine and
visualize your data results.
                      1:37
                    
                    
                      Spreadsheets are great at
displaying rows of data and
                      1:41
                    
                    
                      their associated column topics.
                      1:44
                    
                    
                      But they are not super great themselves
for seeing if there are patterns in data.
                      1:46
                    
                    
                      This is where data visualization can help
with a variety of charts, bar, line,
                      1:50
                    
                    
                      pie, for example, or plots,
like box, scatter, or candlestick.
                      1:55
                    
                    
                      Say for example, that we have a
spreadsheet table of data that shows miles
                      2:00
                    
                    
                      per gallon, or MPG of a car, based on
the number of cylinders in the engine.
                      2:03
                    
                    
                      Looking at the table itself
can be a daunting task to
                      2:09
                    
                    
                      come up with any exacting information.
                      2:12
                    
                    
                      If however, we apply some visualization
to our data, we could use a bar graph
                      2:14
                    
                    
                      to showcase general buckets to see
a comparison of MPG to cylinders.
                      2:18
                    
                    
                      Or a scatter plot, to show each
specific entry in our data, and
                      2:23
                    
                    
                      where it falls in comparison to others.
                      2:27
                    
                    
                      Or we could visualize the data
in a box chart format to
                      2:29
                    
                    
                      see a more clear comparison of
the average, mean, minimum, and
                      2:33
                    
                    
                      maximum MPG for the various engine sizes.
                      2:37
                    
                    
                      Bokeh's strength is that it allows for
                      2:40
                    
                    
                      a wide variety of interactive plots
that are quickly and easily generated.
                      2:42
                    
                    
                      Further, adding interactivity to your
visualizations is often a simple process,
                      2:47
                    
                    
                      and allows for users to examine and
explore data further and deeper
                      2:52
                    
                    
                      without a lot of extra time being spent
on the development side of the project.
                      2:56
                    
                    
                      If we take a quick look at the Bokeh
website, we see that there is some good
                      3:01
                    
                    
                      information in their user guide,
especially on how to get started,
                      3:04
                    
                    
                      as well as some interesting visualization
projects available in the gallery section.
                      3:09
                    
                    
                      I put this link in the teachers notes.
                      3:14
                    
                    
                      So be sure to check it out to
learn more about what Bokeh offers
                      3:16
                    
                    
                      that we won't be covering in this course.
                      3:20
                    
                    
                      We'll be relying on some Python libraries.
                      3:22
                    
                    
                      Like NumPy and
pandas to work with our data as well,
                      3:25
                    
                    
                      showing how to use them with
Bokeh's column data source.
                      3:29
                    
                    
                      But we won’t be going into pandas
data frames or numPy arrays.
                      3:32
                    
                    
                      I'll assume that you have a basic
understanding of what they are and
                      3:36
                    
                    
                      how to generally work with them.
                      3:39
                    
                    
                      Again, I put links in the teacher's
note for a refresher if needed.
                      3:41
                    
                    
                      There are a lot of public data
sets available for exploration.
                      3:45
                    
                    
                      We're going to be exploring and
visualizing world population numbers
                      3:48
                    
                    
                      from worldwide data.info and
their world country population data sets.
                      3:52
                    
                    
                      The data set we'll be using also includes
three-letter country codes added to it,
                      3:57
                    
                    
                      which will be convenient for use later on.
                      4:01
                    
                    
                      Now that we have some of the basic
project requirements covered,
                      4:05
                    
                    
                      let's take a quick break before
we start looking at some code.
                      4:07
                    
              
        You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up