# Introduction to Data Science: Exploratory Musical Analysis

We can find data about almost any subject and analyze it to find interesting patterns. We can then correlate these patterns with observations about society to discover new insights about the world we live in. &#x20;

In this example we will be looking at how popular music has changed in the past 35 years. We are using a dataset that gives us information about the Billboard Top 100 songs since 1980. These songs have been chosen for their popularity measured in sales, radio airplay, and streaming. For each song that made the top 100 list every year, we have data about characteristics like its genre (hip hop, pop, rock, rap) and the kind of words it used (positive, negative). We can use this data to perform a little exploratory analysis and look at patterns in popular music over time.&#x20;

In this first graph below we have plotted the number of hip hop songs that made it to the Top 100 over time. We can see from this graph that the largest number of hip hop songs were in the Top 100 in 2009. From this information, we could infer that hip hop was at its most popular in 2009.

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3AEiqJAhZeDkipTID%2Fimage.png?alt=media\&token=fc6b72ad-3ab9-49e1-bdbb-a66c2ecef4e5)

The next three graphs below have plotted the number of pop, rock, and rap songs that made it to the Top 100 over time. Look at the graphs and think of a few patterns or interesting points that you notice.&#x20;

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3AH7cwVoBrdGaRB3H%2Fimage.png?alt=media\&token=29a02f0e-a295-4a8c-976f-5c263ea8380c)

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3AIvkrs6i1jNWFDcR%2Fimage.png?alt=media\&token=844a514d-8fea-441a-993b-a2ed90e9a2e1)

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3AKgC45CdH1EOEt3F%2Fimage.png?alt=media\&token=54d943e7-54cc-4587-82ba-f57543382608)

These next two graphs show how the percent of positive or negative words in a song change over time. The general trend shows that as time has gone on, songs have become less positive and more negative. Does this surprise you? Why do you think this might be?

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3AMw8OsgOe2KbiwQd%2Fimage.png?alt=media\&token=4dacb11b-6493-42ca-8538-bbd46f371cc0)

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3AObpMzPCge_v6E-e%2Fimage.png?alt=media\&token=7a1e1b9d-ab66-492c-8b40-ee03159874f3)

How has the usage of different words changed over time? Maybe we can get a little bit of this information by seeing how the words appear in songs over time. The word "you," for example, fluctuates between 1000 and 2000 uses over the 35-year time period, but because the number keeps fluctuating (as seen by the spiky nature of the graph), we can't gain that much information about it.

On the other hand, the word "like" has increased significantly over the past 35 years, perhaps as it has emerged as a filler word. This tells us that we've been saying "like" a lot more recently!&#x20;

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3ARVNODdt3nXmdALm%2Fimage.png?alt=media\&token=d48e0c78-630b-45f6-867d-58244df64873)

![](https://1640775911-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_QqIZ-ZgXL5GekACpb%2F-Lm3A5KdKwyxUIpSxehf%2F-Lm3AU1khHUsQ9iIxoW9%2Fimage.png?alt=media\&token=6ab2786a-c01b-4725-bdca-be7c2934630d)

Data is powerful, and we can get a lot of information from it -- what other questions do you have about this dataset? How might you answer them? Using the tools you'll learn in this course, you'll soon be able to answer them!
