This program scrapes views of music videos on YouTube and saves those views along with the date scraped, date the video was uploaded, channel name, and video name to a csv. This information can be used to track and visualize the growth in views over time to assess popularity as well as determine which songs and videos had the biggest launches upon release (for videos tracked starting on the day of their premiere). The granularity of the data depends on how often the user runs this program. Daily data is unlikely unless this program is run each day over the long term. Instead, changes in views by month is more realistic so long as the user runs the program at least towards the beginning and end of each month.
Sales, radio airplay, and streams (from platforms including but not limited to Spotify, Apple Music, Tidal, Amazon Music, YouTube, and Facebook) all contribute to a song's placement on Billboard charts. Additionally, streams count towards a song or album's certification where 150 audio and/or video streams equate to 1 unit for song certification and 1,500 streams equate to 1 unit for album certification (Gold certification = 500,000 units, Platinum = 1,000,000 units, and Diamond = 10,000,000 units).
Spotify holds the largest share of the music subscription market and ideally this project would scrape streams for songs and entire albums from Spotify. However, it does not appear information about plays are included in the Spotify Web API so this would require scraping streams from the desktop app, if possible. So as an alternative, this program scrapes YouTube music video views as they are easily viewable and identifiable on the YouTube webpage. The downside in tracking total streams for an entire album based on YouTube tallies is that artists may not have official audio or lyric videos for album tracks off of albums further back in their discography. Instead, they may only have uploaded official music videos for songs that were released as singles from a respective album era.