You are on page 1of 2

Alexandros Papadopoulos

CSE 160, Winter 2017

The Shift of Popular Music through the Decades


Analyzing the Changes in Musical Tastes from 1958 Present

Question Overview: How have societies tastes* in music evolved over the past half-decade?
What genres of music have been popular over different periods in the given timeframe?

Problem and Motivation: Being a fan of music myself, it has always been an interest of mine to
see how popular music has changed throughout the years. It is fascinating to see the progression
of pop music, from the R&B and Rock roots it had in the late 1950s and 60s into a whole new
definition of pop and electronic music dominating the mainstream today. From a cultural
standpoint, it is important to see how music has changed with the evolution of society, and how
music correlates to mainstream culture. This dataset can also help determine (though it will not
be done in this program necessarily) how music has influenced the development of society by
analyzing the themes prevalent in different genres of music and how they compare to the cultural
norms at that time.

Dataset: https://goo.gl/g1Wr4l

Methodology: This program, given a set of data, will determine the popularity of a musical
genre by year in order to see how music has evolved over the past half-century. Firstly, the
program will sort the data into groups based off of the genre of the #1 songs. Then, the program
will further subdivide the dataset by year in order to find the genres most prevalent in specific
years. It will keep a tally of the genres found in a specific year as well as the number of songs
that fall into those genres. Finally, the program will determine data-points for each genres
prevalence by year (0 if the genre does not show up in a given year) in order to graphically
depict the general trend in popular music evolution in the past few decades. There may be user
interaction available after the graph is shown, so that users can find statistics of how genres
popularity correlate by year in the program without having to look at the graph (i.e. creating
graphs to track each individual genres popularity throughout the given timeframe).

* Tastes are subjective, but here, they are assumed to all be similar based off of the genre of
music that was the #1 single for a given time interval.
Work Plan:

Format data in a .csv file in order to easily read and extract the necessary output
from the data file. Remember to sort data by column and to include an extra row
for column names so removing the necessary data is similar to how it has been
done in previous homeworks. (1 day)
Create the functions to read and reformat the .csv files into Python structures. (2
days)
o format_data(filename) takes a filename as a parameter and returns a list
of list of dictionaries, each dictionary containing keys to the song name,
genre, and time spent at #1.
o sort_songs takes the list of dictionaries from format_data and sorts
them into a dictionary based off of their genre (genres are keys). Puts each
song and its Time at #1 into separate lists by genre.
Create the functions to find the popularity of a given genre by year (using the
length of the dictionary and the Time at #1 data to determine which year) and
calculate its relationship to other genres popular during that given year. (3 days)
o compare_genres(list_of_songs, year) takes a given year as a parameter
and the list of songs sorted by genres, and compares the amount of times a
genre appears in that year. Returns a list of floats of the genre count / total
songs in that year (essentially a percentage), with each index a different
genre.
o weigh_genres takes the list of floats from the previous function, and
converts it to a weighted list of integers, symbolizing the data points.
Higher integers mean a genre was more popular in one year, and lower
integers mean a genre was not as popular that year.
Create a graph plotting the (2 days, 3 w/ additional user interaction)
o data_to_graph given the formatted coordinate points from
weigh_genres, creates a graph that shows the progression of different
genres over the years. Able to print out different statistics based on user
input. (?)

You might also like