Lesson Summary

Summary

In this lesson, students will be formally introduced to data visualization using Bokeh: an interactive data visualization library in Python. They will go through a guided tour of how to use this library, and then will complete a fun activity that involves gathering data from their classmates for the purposes of visualization.  

Outcomes

Students will learn why data visualization is important.

Students will be able to meaningfully visualize data they collect. 

Overview

Session 1 (Line/Bar Graphs):

  • Getting Started - Data acquisition (5 Minutes)
  • Guided Tour - iPython notebook / Powerpoint - (15 minutes)
  • Activity - Plotting data (30 minutes)
  • Wrap Up - Exit slip (5 minutes)

Session 2 (High-level charts):

  • Getting Started - Data acquisition (5 Minutes)
  • Guided Tour - iPython notebook / Powerpoint (15 minutes)
  • Activity - Plotting with high-level charts (30 minutes)
  • Wrap Up - Exit slip (5 minutes)

Learning Objectives

CSP Objectives

Teacher Resources

Student computer usage for this lesson is: required

  • Power Point presentations: "session1.pptx," "session2.pptx"
  • iPython notebooks: "BokehTutorialLesson1_a.ipynb"

Lesson Plan

Session 1

Getting Started (5 minutes)

Come up with 4-5 questions that make sense when visualized with a line graph or bar graph, such as:

  • When do you usually do your homework? 
  • What time do you wake up in the morning on a weekday?
  • What time do you wake up in the morning on the weekend?
  • etc.

Enlist the help of your students in coming up with the questions. Present all questions at the start of this lesson, and solicit answers to each question from each student. These answers will be used later in the lesson, so make sure to collect them in a table-like format such as ".csv"

It is reccommended that you create a Google Form to collect answers to these questions with. You could then ask your entire school to fill out the survey, and have even more data to visualize! 

Guided Tour (15 Minutes)

Use the existing iPython Notebook to introduce Bokeh. Explain data visualization. Have the students follow along as you show them how Bokeh line plotting works, have them attempt the exercise at the end of the notebook. 

Activity (30 Minutes)

Using the data that was collected at the beginning of class, determine the best way to plot the information collected at the beginning of class. Then, plot it! See if you can come up with cool trends by plotting data on the same chart, etc.

Exit Ticket (5 minutes)

Simple exit slip, ask the students what data visualization is, why it is important, how to construct a line graph in Bokeh, etc.

 

Session 2

Getting Started (5 minutes)

Gather data in a similar fashion as the last session. Ask questions of your class / school that make for interesting visualizations. 

Guided Tour (15 Minutes)

Use the powerpoint provided to briefly discuss the high-level charts available in Bokeh.

Activity (30 Minutes)

Have the students use any of the high-level charts to plot the data that was collected in the warm-up.

Exit Ticket (5 minutes)

Ask a simple question about any of the plotting mechanisms covered.