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
Adding colors and legends to graphs and charts helps to make data easier to understand. Bokeh makes the process easy.
Code for color_mapper:
color_mapper = CategoricalColorMapper(factors=['Asia', 'Africa', 'Antarctica', 'Australia', 'Central America', 'Europe', 'North America', 'Oceania', 'South America'], palette=['#00FF00', '#FFD343', 'darkgray', 'brown', 'cyan', 'crimson', 'red', '#0000FF', 'purple'])
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
a country's population and life expectancy
from our world population dataset.
0:00
We used Bokeh column data source to
map our data into usable columns and
0:00
were able to generate the scatter plot
to get a better idea of any relationship
0:04
between life expectancy and population.
0:08
There are couple of issues
with our last plot though.
0:10
Everything was cluttered and
same color, and nothing was labeled.
0:13
Obviously, this makes it a challenge
to come with any conclusions about our
0:17
dataset.
0:21
Bokeh includes some great tools for
this which allow us to map colors to
0:22
specific items or categories of items to
quickly add legends to our visualizations.
0:27
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