{"id":34494,"date":"2022-10-05T08:43:36","date_gmt":"2022-10-05T12:43:36","guid":{"rendered":"https:\/\/studentwork.prattsi.org\/infovis\/?p=34494"},"modified":"2022-10-11T10:15:54","modified_gmt":"2022-10-11T14:15:54","slug":"visualizing-spotifys-global-2020-2021-top-200-song-charts","status":"publish","type":"post","link":"https:\/\/studentwork.prattsi.org\/infovis\/visualization\/visualizing-spotifys-global-2020-2021-top-200-song-charts\/","title":{"rendered":"Visualizing Spotify\u2019s Global 2020-2021 Top 200 Song Charts"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h2>\n\n\n\n<p>At this point, we all know which artists and songs will be crowding the top charts. But, when we look at the top charts and trending songs, what traits do they have in common? What makes a song so popular that it captures global attention? There are so many different factors that go into a song and make it the way it is, whether it\u2019s the tempo, the length, or the musical key. These more discrete factors that make up a song could give us some key insight into what makes a song a top global hit.&nbsp;<\/p>\n\n\n\n<p>In this second lab, we were asked to create a visualization using Openrefine and Tableau Public. Through visualizations, we will explore key characteristics of songs to find the most popular combinations and when these characteristics are most popular. The dataset that was used for this lab includes all of the weekly top 200 songs from 2020-2021 according to Spotify. It is important to point out that this lab will not be focused on specific songs and genres, but rather the characteristics of each song.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"materials-and-method\">Materials and Method<\/h2>\n\n\n\n<p>There were three main steps to getting the final visualizations: the first was finding a data set on a public database, cleaning the data with <a href=\"https:\/\/openrefine.org\/\" data-type=\"URL\" data-id=\"https:\/\/openrefine.org\/\">Openrefine<\/a>, and then creating the visualizations with <a href=\"https:\/\/www.tableau.com\/community\/public\">Tableau Public<\/a>.&nbsp;<\/p>\n\n\n\n<p>The initial step in this process was finding a reliable dataset that could be used to create the visualization. After sifting through many unfinished datasets and ones with questionable credibility, I came across a dataset on <a href=\"https:\/\/www.kaggle.com\/datasets\/sashankpillai\/spotify-top-200-charts-20202021\" data-type=\"URL\" data-id=\"https:\/\/www.kaggle.com\/datasets\/sashankpillai\/spotify-top-200-charts-20202021\">Kaggle.com<\/a> that featured all of Spotify\u2019s weekly top 200 songs from 2020-2021. In addition to the data set having the song title, artist, and rank on the chart, the dataset also included different measures such as danceability, popularity, energy, tempo, and valence, just to name a few. According to the data set\u2019s creator, the songs were scraped using <a href=\"https:\/\/beautiful-soup-4.readthedocs.io\/en\/latest\/\" data-type=\"URL\" data-id=\"https:\/\/beautiful-soup-4.readthedocs.io\/en\/latest\/\">BeautifulSoup<\/a> from <a href=\"http:\/\/spotifycharts.com\" data-type=\"URL\" data-id=\"spotifycharts.com\">spotifycharts.com<\/a>, and the additional song features were calculated using a python library called <a href=\"https:\/\/spotipy.readthedocs.io\/en\/master\/\" data-type=\"URL\" data-id=\"https:\/\/spotipy.readthedocs.io\/en\/master\/\">Spotipy<\/a>.&nbsp;<\/p>\n\n\n\n<p>Openrefine is an open source web-based program that allows users to clean and manipulate datasets. The Spotify dataset was downloaded as a CSV file and uploaded to Openrefine. After cleaning the dataset and getting rid of irrelevant information, the dataset was ready to be uploaded to Tableau Public. From there, various combinations from the dataset were explored and some interesting trends were found regarding the top songs from 2020-2021.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"results-and-visualizations\">Results and Visualizations<\/h2>\n\n\n\n<p>The most interesting results within this dataset were found when measuring the highest charting position and various song features. After learning the definitions of the song measures as given by the author of the dataset, there were three measures that stood out when determining the most important variables. The three variables were song length, danceability, tempo, and valence. The song length was measured in minutes, the tempo referred to the average beats per minute of the song, the danceability measure referred to how easily you can dance to the song on a scale of 0 to 1 (1 being the most danceable), and the valence measured the song\u2019s overall tone on a scale of 0 to 1 (1 being the happiest). Since each variable was measured based on the highest charting position, each measure was the average of all songs with the same ranking.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"#\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/public.tableau.com\/static\/images\/Po\/PopularSongCharacteristics\/Sheet5\/1_rss.png?resize=840%2C630&#038;ssl=1\" alt=\"Spotify's Top 200 Song Characteristic Sweet Spots \" width=\"840\" height=\"630\" \/><\/a><figcaption>Graph featuring Various Popular Song Characteristics<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-code has-white-color has-white-background-color has-text-color has-background\" style=\"font-size:2px\"><code>            &lt;script type='text\/javascript'&gt;                    var divElement = document.getElementById('viz1664971715752');                    var vizElement = divElement.getElementsByTagName('object')&#091;0];                    vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';                    var scriptElement = document.createElement('script');                    scriptElement.src = 'https:\/\/public.tableau.com\/javascripts\/api\/viz_v1.js';                    vizElement.parentNode.insertBefore(scriptElement, vizElement);                &lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>From the above graph, you can see each variable\u2019s sweet spot for the top 200 songs. These songs all had similar tempos, valences, durations, and danceability rankings. With these four rankings put together, many aspects of the songs are represented despite the dataset featuring many other measures of a song\u2019s features.\u00a0You can view this interactive graph <a href=\"https:\/\/public.tableau.com\/views\/PopularSongCharacteristics\/Sheet5?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link\" data-type=\"URL\" data-id=\"https:\/\/public.tableau.com\/views\/PopularSongCharacteristics\/Sheet5?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link\">here.<\/a> <\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\"><\/div>\n\n\n\n<h3 class=\"has-medium-gray-color has-text-color wp-block-heading\" id=\"some-additional-visualizations\">Some Additional Visualizations<\/h3>\n\n\n\n<p>While exploring Tableau\u2019s features, I ran into some other interesting visualizations that give insight into listening behaviors and song trends.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"#\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/public.tableau.com\/static\/images\/Sp\/SpotifyTop200SongCharacteristics\/Sheet1\/1_rss.png?w=840&#038;ssl=1\" alt=\"Number of &quot;danceable&quot; Songs in Relation to the Peak Song Charting Date \" \/><\/a><figcaption>Graph Showing the Times at which Songs were most Danceable<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-code has-white-color has-white-background-color has-text-color has-background\" style=\"font-size:2px\"><code>            &lt;script type='text\/javascript'&gt;                    var divElement = document.getElementById('viz1664972058702');                    var vizElement = divElement.getElementsByTagName('object')&#091;0];                    vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';                    var scriptElement = document.createElement('script');                    scriptElement.src = 'https:\/\/public.tableau.com\/javascripts\/api\/viz_v1.js';                    vizElement.parentNode.insertBefore(scriptElement, vizElement);                &lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>In this graph, the largest circle represents the time in which people were listening to the most danceable songs. Coincidentally, this time period was the week where people celebrated the New Year.\u00a0The two other red circles on the graph also represent time periods within the month of January 2020. You can view this interactive graph <a href=\"https:\/\/public.tableau.com\/views\/SpotifyTop200SongCharacteristics\/Sheet1?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link\" data-type=\"URL\" data-id=\"https:\/\/public.tableau.com\/views\/SpotifyTop200SongCharacteristics\/Sheet1?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link\">here.<\/a> <\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"#\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/public.tableau.com\/static\/images\/Sp\/Spotify200FavoriteChord\/Sheet2\/1_rss.png?w=840&#038;ssl=1\" alt=\"Most Popular Main Song Chord based on Averages \" \/><\/a><figcaption>The most popular main chords of Songs according to Average Highest Charting Position<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-code has-white-color has-white-background-color has-text-color has-background\" style=\"font-size:2px\"><code>            &lt;script type='text\/javascript'&gt;                    var divElement = document.getElementById('viz1664972391370');                    var vizElement = divElement.getElementsByTagName('object')&#091;0];                    vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';                    var scriptElement = document.createElement('script');                    scriptElement.src = 'https:\/\/public.tableau.com\/javascripts\/api\/viz_v1.js';                    vizElement.parentNode.insertBefore(scriptElement, vizElement);                &lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>In this graph, the main song chord was measured against the highest charting position on the Spotify charts. The color represents the mood of the song, with red being the happiest and black having the lowest valence. An important aspect to note is the lower the highest charting position, the better since it is closest to the number one position.\u00a0You can view this interactive graph <a href=\"https:\/\/public.tableau.com\/views\/Spotify200FavoriteChord\/Sheet2?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link\">here.<\/a><\/p>\n\n\n\n<h3 class=\"has-medium-gray-color has-text-color wp-block-heading\" id=\"behind-the-visualizations\">Behind the Visualizations<\/h3>\n\n\n\n<p>Since there were many different variables coming into play with these visualizations and measures with scales of 0 to 1, it was important to choose a color scheme that had a large contrast to increase visibility. The color scheme chosen for these graphs was a red-black diverging theme.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"reflection\">Reflection<\/h2>\n\n\n\n<p>Despite having difficulty with the visualizations, the lab itself was very entertaining since we were able to explore topics relevant to our interests. If I were to do this again, I would probably choose a dataset with fewer measures to use for my first official visualization project. There are definitely far more interesting things one could uncover with this dataset, but due to my lack of experience with the separate platforms I ended up running into different problems that could have been avoided with more practice. Additionally, there were certain song attributes that I thought would have strong correlations but ended up having little to no relationship. This affected the final results and final visualizations created for this lab. I was still able to find some interesting connections within the dataset, and give insight into a few of the most popular characteristics that make a song a top-charter.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"references\">References<\/h2>\n\n\n\n<p>Pillai, Sashank. 2019. \u201cSpotify Top 200 Charts (2020-2021).\u201d Kaggle. https:\/\/www.kaggle.com\/datasets\/sashankpillai\/spotify-top-200-charts-20202021.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction At this point, we all know which artists and songs will be crowding the top charts. But, when we look at the top charts and trending songs, what traits do they have in common? What makes a song so popular that it captures global attention? There are so many different factors that go into&hellip;<\/p>\n","protected":false},"author":4023,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"coauthors":[1796],"class_list":["post-34494","post","type-post","status-publish","format-standard","hentry","category-visualization"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paBdcV-8Ym","_links":{"self":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts\/34494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/users\/4023"}],"replies":[{"embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/comments?post=34494"}],"version-history":[{"count":7,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts\/34494\/revisions"}],"predecessor-version":[{"id":34519,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts\/34494\/revisions\/34519"}],"wp:attachment":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/media?parent=34494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/categories?post=34494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/tags?post=34494"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/coauthors?post=34494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}