What are your
favorite songs?
Data Kids: What are your favorite songs?
Presented by Tableau
Introduction
Think about the music you like to listen to. Do you have a favorite song, artist,
album, or playlist? Let's start thinking about the different aspects of a song,
like instruments and lyrics. Do your favorite songs have anything in common?
Maybe your favorite music falls within the same genre. A genre is a fancy term people use
to describe different styles of music. Common genres include hip-hop, pop, alternative, and
rock.
Maybe you prefer upbeat songs that you can dance to. The rate or speed of a song is called
a tempo. If you walk, you are moving at a slow tempo. If you run, you are moving at a faster
tempo. Think about how different your favorite song would sound if it was played a lot faster
or a lot slower.
Classifying songs by genre, tempo, or using other common traits allows us to see trends in
our favorite music. All of this information is valuable data that we can count, summarize,
and graph!
Responsibilities
Introduction: 10-15 minutes
Plan to spend approximately 10-15 minutes learning about data.
Activity: 15-20 minutes
Plan to spend approximately 15-20 minutes collecting data about your favorite songs.
Conclusion: 10+ minutes
Plan to spend at least 15 minutes reading the conclusion and, if you'd like to, completing
the extra credit.
Learning Objectives
Explore and see patterns in an everyday activity
Learn how to collect and organize data
Make a summary table and graph of your results
Supplies
This activity guide (printed or digital) Ruler
A pencil Data table template
Markers or colored pencils For the extra credit—Tableau Desktop
Paper or Prep and the Music Data Excel
Calculator template!
Page 1
Review
What is data?
Data is a collection of information gathered by observation, questioning or
measurement. It includes facts and statistics collected for reference or analysis and
makes the basis of reasoning or calculation.
What data is qualitative?
Qualitative data is used to describe something. It's usually subjective, meaning it is
influenced by personal feelings, tastes, or opinions. We capture qualitative data by
uses our senses and asking open-ended questions.
Example: How playful is your cat?
What data is quantitative?
Quantitative data is based on numbers. It's objective, meaning it's based on fact and
is not influenced by personal feelings or opinions. We capture quantitative data by
counting, measuring, or asking closed-ended questions.
Example: How many pets do you have?
What quantitative data is discrete?
Discrete data is collected by counting. The result is a whole number.
Example: How many students are in your class? How many home runs did he hit?
What quantitative Data is continuous?
Continuous data is collected by measuring. The result is typically a decimal or
fraction.
Example: How tall are you in inches? What is the temperature in °F?
What is a data visualization?
A data visualization is a visual representation of information and data. It provides an easy
way to see and understand trends and patterns.
What is Tableau?
A tool that helps you see and understand your data quickly and easily.
Page 2
Activity Instructions
Step 1: Use the "Music Data" template in Excel, the ready-made blank table, or draw a grid
with 6 columns. It should like the example below. Title the first column Song Names, then
write down the names of 5-10 of your favorite songs.
Step 2: Think about traits you could explore about these songs. For this activity, we're going
to collect data about the Album, Artist, Genre, Year, and Song Length. Add those headings
to your table, like the example below.
Step 3: Fill out the table by looking up each song on Google, Spotify, or Apple Music.
Page 3
Activity Exercise
Select a difficulty level and answer the two questions within that section.
Beginner
1) Is Year qualitative or quantitative?
2) Is Song Length discrete or continuous?
Intermediate
Be sure you use the dataset you just created to answer these questions!
3) Which song is the longest? (i.e. has the greatest song length?)
4) Which song is the oldest? (i.e. has the earliest song year?)
Advanced
Pick a genre with at least 2 songs.
5) What is the total song length for all songs in that genre? Answer in seconds.
Hint: Grab your calculator! You'll be adding the song lengths together. If you recorded your song length
in minutes + seconds like we did (e.g. 3:22), you will want to convert those minutes to seconds first.
To do this, multiply the number of minutes by 60, then add the remaining seconds. (e.g. 3:22 = 202
seconds)
6) What is the average song length for all songs in that genre? Answer in seconds.
Hint: Grab your calculator! You'll need to divide the total song length you just calculated by the total
number of songs in that genre.
Page 4
Time to Visualize!
Count the number of songs that fall into each genre.
How many songs fall within each genre?
Using the genre totals you just calculated, make a bar chart to visualize the number of
songs within each genre. Color each bar a different color.
Conclusion
Although all of the activity exercises can be completed by hand, Tableau makes it faster and
easier to answer these types of questions! Let's see how.
If you'd like to learn how to answer these questions in Tableau yourself, please see the step-
by-step instructions in the Extra Credit section starting on Page 6.
Page 5
Extra Credit
1) With the help of an adult, download Tableau Public using the link below.
https://public.tableau.com/en-us/s/download
2) Install the package via the install wizard.
3) Once installed, double click on the program to open the Tableau Public desktop
application.
Page 6
4) Once open, this is what you should see:
5) Now we are ready to pull in our data! If you haven't already, make sure to enter all of your
song data into the "Song Data" Excel template provided.
Page 7
6) Now let's pull in our data! Click Microsoft Excel in the top left corner, then select your
dataset or use the sample dataset provided.
7) Now drag the sheet with your data into to white Drag tables here section of the screen.
Page 8
8) First, lets recreate the bar chart we made to visualize number of songs per genre! Click
Sheet 1 in the bottom left corner of the screen.
Hover over the word "Genre". You'll notice a blue oval appear behind it. Click and drag
"Genre" up and to the right, releasing it next to the word Columns when a little orange arrow
appears.
Page 9
Now drag "Sample (Count)" to Rows, following the same steps above. "Sample (Count)"
represents the total number of songs listed in your table.
Tableau made us a bar chart!
Page 10
What if you want to make each bar a different color? Tableau makes it easy to do that, too!
Simply click and drag "Genre" out to where it says Color.
Tableau colored our genres for us!
Page 11
9) Let's look at another way to visualize our genre data. From this point on, things will get a
little more intermediate to advanced.
First, we'll start by duplicating our current bar chart sheet. This will create an exact copy in a
new sheet. You'll do this by right clicking "Sheet 1" and selecting "Duplicate".
This brings us to a new sheet, with the same bar chart. Now, let's try one of Tableau's
features called Show Me. In the upper right corner, click "Show Me", you will see all of the
different types of visualizations that Tableau can create using Genre and Sheet Count 1.
Let's select "Packed Bubbles".
Page 12
You will see Tableau quickly transformed our bar chart to a chart of bubbles. We can still
see that the Pop genre is the most popular because it is the biggest bubble.
Now, let's make the text a little more fun and easy to read. To do that, we will go to our
marks card, and click the Label square.
Page 13
This opens up a box that allows us to change the font and text size. Let's change the font
size to 12 and the font to "Chalkboard".
Now we have our complete bubble chart!
Page 14
10) We've had some fun creating visualizations. Now, let's try solving one of the Advanced
problems. Since our songs are in minute + second format, we'll need Tableau's help
converting those minutes into seconds.
First, hover your mouse over "Song Length" on the left side of the screen. You'll notice the
background turns blue, and a drop-down arrow appears in the right hand corner.
Now click into the calendar icon to the left of the word "Song" and select String. The
calendar icon should change to Abc.
Page 15
Click the dropdown arrow on the right, hover down to Transform, and click Split.
You should have two new fields, "Song Length - Split 1" and "Song Length - Split 2"
Page 16
Let's rename both so they make a bit more sense. Click into the dropdown menu of "Song
Length - Split 1" and rename it "Minutes". Then do the same for "Song Length - Split 2",
clicking into the dropdown menu and renaming it "Seconds".
Now click the Abc next to the newly renamed "Minutes" field and select Number (whole).
Do the same with the "Seconds" field, but select Number (decimal) instead.
We're ready to calculate! Click the dropdown menu to the right of "Minutes".
Page 17
Hover down to Create, then click Calculated Field...
You'll notice a new window pops up. Change the name of the calculation from "Calculation1"
to "Minutes to Seconds". Type "* 60" next to [Minutes] to multiply minutes by 60, since there
are 60 seconds per minute. Hit OK when finished.
You'll see that Tableau generates a new field. This new field should be green!
Page 18
So close! Now click the dropdown menu to the right of "Minutes to Seconds".
Hover down to Create, then click Calculated Field...
Just like last time, you'll notice a new window pops up. Change the name of the calculation
from "Calculation1" to "Total Song Length (seconds)". Type "+ Seconds" next to [Minutes to
seconds] to add the remaining seconds. Hit OK when finished.
Page 19
Now we can visualize! Drag "Song Name" to Rows and "Total Song Length (seconds)" to
Columns.
Tableau will create an easy-to-read horizontal bar chart!
Hover over "Total Song Length" along the x-axis. When you hover, you'll notice an icon with 3
bars and an arrow appears.
Page 20
Click that icon, and Tableau will sort your data from longest to shortest.
In the top banner above the green "SUM(Total Song Length)" field, click into the dropdown
arrow next to the word Standard and select Entire View. Then, click the T icon to the left of
that dropdown.
Ta-da! Tableau has now sorted and labeled all of your songs, showing you not only which
song is the longest, but also the total time in seconds for each song in your dataset.
No calculator necessary!
Page 21