Unit 6. Data Visualization
Revision Date: Feb 11, 2017 (Version 2.1.1)Summary
EarSketch teaches computer science through music composition and remixing. No prior knowledge of either computer science or music is needed. Students can express their own unique style. EarSketch also lends itself well to student collaboration as well as a discussion on proprietary ownership.
EarSketch is a web-based application, so there is no software to install. You need a current version of Chrome, Safari, Firefox, or Edge running on Mac, Windows, Linux, a ChromeBook, or a tablet with an attached keyboard. You also need headphones or speakers.
EarSketch consists of two components:
Students create an account to get Cloud storage for their files.
Outcomes
Optionally from Section 3.
Overview
The Lesson is divided into three sections.
Section 1 Getting Started with EarSketch is anticipated to take about 5-6 sessions.
Section 2 is anticipated to take about 5 sessions to complete these EarSketch units.
Section 3 is optional and is anticipated to also take about 5-6 sessions to complete these Earsketch units.
Each session will have the following elements.
Sources
EarSketch curriculum is available at https://earsketch.gatech.edu/earsketch2/#. The EarSketch curriculum and teaching materials are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
Student computer usage for this lesson is: required
Students will need earbuds or headphones for these lessons.
EarSketch consists of three components:
The software toolset component includes the EarSketch code editor and digital audio workstation environment to write code and make music. It runs inside a web browser with the latest versions of Chrome, FireFox, or Safari. Internet Explorer is not supported and the digital audio workstation will not load. You must use a browser that supports Web Audio. (Internet Explorer 12 plans to include support for Web Audio.)
Teachers should review the first two modules of the student curriculum to learn the components of EarSketch: Unit 1 (Getting Started) and Unit 2 (Effects and Beats).
Next, teachers should access the teacher curriculum, which is designed to help computer science teachers with little or no music knowledge begin teaching EarSketch in their classrooms. It presents music concepts, rhythms, pattern and variety, and effects as they relate to music programming in EarSketch.
Finally, teachers should complete the student curriculum to get an idea of what students will be learning and doing.
Journal Prompt: What are possible advantages there are to creating and mixing music on a computer?
Responses should be collected from each student and used to create a word cloud. Project the following four benefits to programming music and ask, "Are any of these missing?"
Students should select one of these four points and record throughts and observations as to their meanings.
Direct students to Unit 1: Getting Started with EarSketch (http://earsketch.gatech.edu/uncategorized/unit-1).
Within the first unit, they should explore the section 1.1. Introduction to the DAW (Digital Audio Workstations) (http://earsketch.gatech.edu/uncategorized/unit-1#chap11). Students should research the following definitions and procedures, then share them with a partner.
Especially important is the process of creating, opening, running, editing, and saving EarSketch python scripts both on the EarSketch cloud as well as in the classroom. Once students have completed this task, demonstrate the following sections for them:
1.8 Sections of an EarSketch Script
2 All programs process data, even those being developed for personal expression. Demonstrate interactively the use of Python variables to store and retrieve data and to express values. Introduce student to the concept of abstraction and have students identify at least one detail that is hidden by each of data representation they review.
Wrap Up (5 min)
It is important that students know how to use the curriculum and the online development environment. Students should reflect on the process of creating, saving and retieving program in EarSketch.
Assignment 1.1
This assignment can be found within the curriculum resources at Unit 6 > Lesson 1 > EarSketch Units > Unit 1.
Journal: Students should open their Assigment 1.1 (homework from the previous section) and discuss what they learned while completing it with their elbow partners. They should record in their journals two observations made either in the previous session or during the completion of the assignment. Any questions remaining after these discussions should be shared by students.
Beats, Effects and Tempo
Program Design and Functions
Students work in pairs through the 8 sections below and add any questions they have to those posted during the getting started session.
Effects in EarSketch: setEffect
Identify and responding to questions students have shared. Use other studetns as a resource to answer as many questions as possible.
Distribute and assign Assignment 2.2.
Collect: Assignments 1.1 and 2.2
Journal: Students should discuss with their elbow partners the first two assignments, reflecting on the lessons learned and identifying any questions that are lingering. Unresolved questions should be posted on the board.
Some time should be used to respond to questions students posted at the beginning of the session. If questions are regarding upcoming material answer these during the next activity.
Students should work together to complete a project for units 1 through 3. This project can be found under Unit 6 Resources > Lesson 01 - Earsketch > Projects > Project Unit 1-3_1.docx. The final product should be one working program per group.
Students should get into pairs and complete Quiz 3.1. Collect an exit slip from students of any questions they need help with. Collect the quiz.
Students should complete Assignment 3.1 for the next session.
Journal: Students should discuss with elbow partners the lessons they learned from session 3 (including the assignment and quiz). Any unresolved questions should be posted to the board.
Before continuing, any questions regarding last session's formative quiz or assignment 3.1 should be answered.
Students again work in pairs to review Program Design and Functions using the following elements in the EarSketch curriculum.
Effects in EarSketch: setEffect
4.1 Using Effects in EarSketch
Students should reflect on how they benefited from cooperating with one another as partners and how they might beneifit from collaboration on the next project.
Students should prepare for the section 1 exam using the assignments, quizzes and EarSketch units 1-3 as resources.
Students should upload their collaborative projects from session 4, including the .wav output of the music they created.
Students will take the section 1 test (units 1-3). The test to be administered can be found at the following location: Unit 6 Resources > Lesson 01 - Earsketch > Section Tests > Unit 1-3 Test.docx.
Time permitting, discuss the current music sharing sight and the ethical issues surrounding public sites. If students require more time to complete their collaborative projects, some could be given here as well.
Going foward, host a version of March Musical Madness. Hold a single elimination tournament to select the class musical section 1 champion. If going on to sections two and three, consider doing just one round of the contest. Each week allow pairs to enter their best product either from something newly created or modified.
Students should brainstorm lessons learned from the first section. They will be working in pairs throughout this entire section so this is a good time to also discuss standards for collaboration and cooperation. Partners/ work groups should be specified here. Notes gathered during this section, along with the EarSketch API documentation, will be allowed for the section 2 exam.
Student work in pairs through the Reusing Code sections below and post any questions they have.
9.6 Automating Effects with Loops
Using students as a resource whenever possible, answer any questions students have identified.
Working in pairs, students should complete Quiz 4. This quiz can be found under resources at the following location: Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 4.
Optional - Time permitting have stuend seletc a project and collaborate in its development.
With partner/work group, select an assignments from the following list (these assignments can be found under the following: Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 4).
Assignment 4.1
Assignment 4.2
Assignment 4.3
Assignment 4.4
Assignment 4.5
Assess student progress from the previous session. Student working groups should identify questions or concerns. It is crucial that major concerns are addressed as soon as possible.
12.2 Beat Patterns with Strings
Using students as a resource whenever possible, answer any questions students have identified.
Working in pairs, students should complete Quiz 5.1. This quiz can be found under resources at the following location: Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 5.
Select and assign one of the following to assignments (these assignments can be found under the following: Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 5):
Assignment 5.1
Assignment 5.2
Assess student progress from the previous session. Student working groups should identify questions or concerns, making sure to share all concerns pertaining covered material before the following session.
Students should work together to complete a project for units 1 through 3. This project can be found under Unit 6 Resources > Lesson 01 - Earsketch > Projects > Project Unit 4-6_1.docx. The final product should be one working program per group.
Time permitting students shoul work individually on assignment 6.1. This assignment can be found within the curriculum resources at Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 6.
Students should identify questions or concerns and share those that they think are most important, supplementing their notes with important comments.
Working in pairs, students should complete Quiz 6.1. This quiz can be found under resources at the following location: Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 6.
Assess student progress from the previous session. Student working groups should identify questions or concerns, making sure to share all concerns pertaining covered material before the following session.
Have your students select and complete (in pairs) one of the following two projects. These projects can be found under Unit 6 Resources > Lesson 01 - EarSketch > Projects:
Project Unit 4-6_1.docx
Project Unit 4-6_2.docx
Students should consolidate their notes and prepare for the section 2 exam next session. REMINDER: It is an open note exam.
Journal: Have students reflect on the ethical concerns raised by digital media innovations such as EarSketch. In their journals, they should write down a specific ethical issue associated with the use of EarSketch. They should also point out one additional piece of online technology that raises digital media related ethical concerns.
Distribute and administer the section 2 exam. This exam can be found at the following location: Unit 6 Resources > Lesson 01 - EarSketch > Section Tests > Unit 4-6 Test.docx.
Host a version of March Musical Madness. Hold a single elimination tournament to select the class musical section 2 champion. If going on to section three, consider doing just one round of the contest. Each week allow pairs to enter their best product. It can be derived from the in-class work or be a completely new, out-of-class creation.
Section 3 is optional and is anticipated to also take about 5 sessions to complete these EarSketch units. Students should be working very independently during this unit in prepartion for the Create Task.
11 EarSketch Unit 7: Teaching Computers [1 session]
12 EarSketch Unit 9: Recursion [1 session]
13 Project 3 [2 sessions]
14 Summative Assessment
Session 11:
Getting Started
Guided Activities
Formative Assessment
Assignment:
Wrap Up:
In pairs. then study groups students identify questions or concerns and share those they think are most important and supplement their notes with important comments.
Session 12:
Getting Started
Assess student progress from Session 11. Groups identify questions or concerns and share any items of concern before day 2 of this section.
Guided Activities
Formative Assessment
Assignment:
Wrap Up:
In pairs. then study groups students identify questions or concerns and share those they think are most important and supplement their notes with important comments.
Session 13 and 14:
Getting Started
Assess student progress from Session 12. Groups identify questions or concerns and share any items of concern before days 3 and 4 of this section.
Guided Activities
Assignment:
Prepare for Section 3 exam.
Wrap Up:
In pairs. then study groups students identify questions or concerns and share those they think are most important and supplement their notes with important comments.
Session 15:
Guided Activities
Wrap Up:
Host a version of March Musical Madness. Hold a single elimination tournament to select the class musical Section 2 champion. If going on to three consider doing just one round of the contest. Each week allow pairs to enter their best product either from somethnnewly created or modified.
Assignment:
None
Section 1:
Quiz 1.4-1, 1.4.2, 2.1-1, 2.1.2, 3.1, 3,2 and 3.3
Section 1:
Quiz 4, 5.1 and 6.1
Section 1:
Quiz 7.1 and 9.1
Section 1:
Project Unit 1-3_1 and Unit 1-3 Test
Section 2:
Project Unit 4-6_1 and Unit 4-6 Test
Section 3:
Project Unit 7-9_1 and Unit 7-9 Test
Unit 6. Data Visualization
Revision Date: Jul 18, 2016 (Version 2.1.1)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):
Session 2 (High-level charts):
Student computer usage for this lesson is: required
Come up with 4-5 questions that make sense when visualized with a line graph or bar graph, such as:
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!
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.
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.
Simple exit slip, ask the students what data visualization is, why it is important, how to construct a line graph in Bokeh, etc.
Gather data in a similar fashion as the last session. Ask questions of your class / school that make for interesting visualizations.
Use the powerpoint provided to briefly discuss the high-level charts available in Bokeh.
Have the students use any of the high-level charts to plot the data that was collected in the warm-up.
Ask a simple question about any of the plotting mechanisms covered.
Unit 6. Data Visualization
Revision Date: Jan 25, 2017 (Version 2.1.1)Summary
Continuing the focus on data analysis from Unit Five, students will use the browser-based Dataquest learning environment (http://www.dataquest.io) and supplementary materials to explore more ways in which Python can be used to analyze data. For the first week, students will explore Dataquest through the browser-based "missions" on the website. Each lesson begins with a warm-up/journal entry, and students then spend the rest of the time working through the missions at their own pace. For the second part of the lesson, students will design and implement their own data analysis project in order to prepare them to complete a data-focused Create Performance task.
Outcomes
Overview
Week One: Learning Dataquest
Week Two: Data Analysis Project
Student computer usage for this lesson is: required
DataQuest.io website: https://www.dataquest.io/learn
Week One Materials: Unit 6 Resources -> DataQuest.io -> Week One Lesson Materials -> Mission #
Week Two Materials:
Datasets: Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials -> Datasets
Sample Project: Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials -> Sample Project
Project Rubric: Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials -> "Data Analysis Project Rubric"
(Quizzes for Week One and Week Two are in the corresponding teacher-only resource folders)
Note: all worksheets and quizzes can be found in the teacher-only resource folder, Unit Six -> DataQuest.io -> Week One Lesson Materials -> Mission #
Directions for working in Dataquest.io
Quizzes should be done in class, and should take a minimum of 10-20 minutes to complete. It is advisable to not give a quiz out in the last ten minutes of class. If there are only a few minutes left, the student can use the time to add to their notes.
If a student fails one of the quizzes, they may be given the chance to go back and add to their worksheet before attempting the quiz again. (Multiple versions of all coding quizzes are available.)
There are a total of four Missions for the Introduction to Python track. Students are only required to do the first three. The fourth Mission has worksheets/quizzes for those students who get to it, and can be counted as extra credit/normal grade at the teacher’s discretion. Two additional optional missions are available: one on data visualization, and one on working with statistics.
Show the first two minutes of the introductory video in Mission 1 on the Dataquest.io website. Students will discuss their reactions and thoughts about Data Science.
Pull up d3js.org on the projector. This is the webpage for a data visualization library in Javascript that has many great examples of ways to make connections from data. You can explore by clicking on one of the tiles on the front page. Explore the D3 front page with the class and discuss reactions.
This warm-up time is used for class discussion on progress through the missions. You can use this time to gauge the students' comfort with Python concepts by having students vote with their heads down. If enough students are having trouble, you may want to have a separate review session during the class.
This warm-up time can be used for reviewing a Python concept (such as Dictionaries) or looking at a current news article involving data analysis (any article about a topic of interest to the students that uses statistics would be appropriate). Students should think-pair-share on additional ways in which data could be used.
Students should do a show of hands to see where everyone is in the missions. The class should have a general discussion about progress.
Note: All materials for this section can be found in Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials
Directions:
For this week, students will be pairing up to create and implement a data analysis program of their own design.
For the rest of the week, students should work on their projects in their groups. At the end, teachers can optionally have them present their PowerPoints to the class, exchange presentations in pairs, or merely turn everything in.
Week two project.
Unit 6. Data Visualization
Revision Date: Sep 07, 2016 (Version 2.1.1)Pre-lesson preparation
The second session is a programming activity and requires using NetLogo (a tutorial is in the Unit 4 Lesson on Hypothesis Testing with NetLogo) or using Python with Bokeh (for more advanced students).
Summary
Students will be introduced to the topic of diversity and computational problems, learn about and discuss implications of the proliferation of algorithms in society, and reflect on how the quality of input data and small, sometimes unintended biases can lead to low quality solutions.
Outcomes
Overview
Session 1
Session 2
Student computer usage for this lesson is: required
Supplementary articles:
Think-Pair-Share: Artificial intelligence algorithms in daily life?
Ask your students to list discuss what artificial intelligence algorithms they think affect them in daily life and how they are affected. How would it be different if those algorithms did not recognize them or treated them inappropriately? If an algorithm makes the wrong judgement about them, what would they do, who could they go to for help? It is OK if students are unsure about the answers as it leads into the following discussion.
Algorithms have become prominent and common in daily life. In particular, algorithms that use artificial intelligence (AI) or a technique called machine learning are employed to make decisions that affect us, sometimes in ways we aren't aware of and cannot control. For example, machine learning is used by Google, Facebook, Flickr, among other companies to detect faces in photographs, apply labels, or automatically tag images with people they recognize. In general, these algorithms are trained on input data (such as images of people), and are improved iteratively using statistical methods until they learn how to categorize, differentiate, and reach a correct answer. Another example of companies using AI is in personalized marketing or recommendation systems. For instance, Amazon tailors the products they suggest based on an algorithm trained on similar customers' purchase history. Or a company like Netflix will recommend movies to users who rate similar movies similarly.
At the heart of these algorithms is the fact that their solutions all depend on the initial parameters and input data used to train them. What happens when those parameters and data are not sufficiently diverse? Small changes in those parameters, oversights in the training data, implementer bias (both intended and not), and missing distributions or categories can all negatively prejudice algorithms. All this is important to keep in mind as algorithms start determining aspects of our lives and there is less or no control over the input and decisions they make about and for us.
A 2016 article in the New York Times (http://www.nytimes.com/2016/06/26/opinion/sunday/artificial-intelligences-white-guy-problem.html?_r=0) highlights an example problem where lack of diversity leads to lower quality solutions. In particular, various AI and machine learning algorithms were developed by and calibrated on too limited a population, leading to insulting and significantly bad results, such as not recognizing people with dark skin tones or tagging them inappropriately. Examples where diversity may greatly influence the quality and real-world implications of algorithms include:
Parable of the Polygons
A hands-on example of how initial parameters, subtle biases, and lack of diversity can greatly affect an algorithm's execution is in the "Parable of the Polygons" (http://ncase.me/polygons/). The Parable of the Polygon is a simulation based on the mathematical model of how segregated communities may arise from small differences preferences, based on the theory of Thomas Schelling, an economist and game theorist who received the Nobel Prize for Economics in 2005.
Guide students through the website and let them explore dragging polygons, changing settings, and see how they can influence (it is best for them to follow along individually or in groups on their own computer).
An alternative version of the final sandbox with three polygon shapes is also available here: http://ncase.me/polygons-pentagons/play/automatic/automatic_sandbox_frame.html
Journal or Homework
Have your students continue to explore the Parable of the Polygons website and answer the following questions using the sandbox at the bottom of the website:
Think-Pair-Share: Algorithms, Diversity, and Solutions [5 min]
Two options: guided programming exploration with NetLogo, or more involved Python programming project for advanced students
Option 1: Using NetLogo
Option 2: Using Python with Bokeh (for advanced students)
Have students re-create the Parable of the Polygons themselves in Python, time with at least four types of polygon shape/colors. The source code for the Parable website is hosted on GitHub here: https://github.com/ncase/polygons/blob/gh-pages/play/automatic/automatic.js It is in JavaScript, but it serves as a good pseudocode basis. Alternatively, students could use the NetLogo code from Option 1 as another reference in creating their simulation.
Journal: Have your students reflect and list 5 examples or ways in which diverse input makes for better solutions.