Session Ready
Exercise

Multi-Layer Plot 1 (Scatter + Line Plot)

In this exercise you will practice combining multiple rbokeh layers. You will use a subset of the gapminder data called data_countries that includes data for three African countries ("Kenya", "Ghana", "Zambia") to plot the change in gdpPercap over time.

You will add markers to trendlines by adding a points layer on top of a lines layer.

Note that:

  • gapminder,dplyr abd rbokeh packages are pre-loaded.
  • data_countries dataframe is available in this session.
Instructions 1/2
undefined XP
  • 1
  • 2
  • Using the data_countries dataframe, create a line plot of gdpPercap versus year.
  • Color the lines by country.