This repo uses the Search endpoint with just a data range as the main query parameter (here: year:2000-2014) and creates a database of Most followed artists with their corresponding Spotify ID. These genres would probably need to be re-classified according to your needs. The Spotify Web API Artists endpoint gives you the genres of an artist (and their number of followers) so if you get Artists charts from another source (with their Spotify ID), you could potentially extract each artist genres and re-rank the Artists within each genre. Chartmetric, the company that wrote the blog has probably a scraping algorithm that they will not disclose as it is their business model to sell these stats. Getting charts directly from the official Spotify Web API is not possible. We collected MLs data for the Top 100 artists of each genre, ranked by Where weeks is a list of strings containing the filename of the file to be downloaded in the request (previously generated with another code, omitting it for sake of clarity), for example:. Print('error with the following file:'+str(csv_url)) States = Ĭsv_url = ''+state+'/weekly/'+week+'/download' This is the code I used to download the top 200 weekly, but it's no use for my goal: import requests ![]() Is there a way to retrieve the top 100 artist by genre in a given period? I've been looking around the Spotify API and Spotify available datasets, but I can't find a solution to achieve my goal. ![]() For example, they're able to retrieve the top 100 artist by genre. ![]() I would like to emulate what they're doing in the article. I read this article: Spotify genre trends during pandemic which is pretty interesting. I also managed to use those top 200 to retrieve each song and extract features, release date ecc. So far I downloaded the top 200 weekly and grouped it by states with a simple script, you can finde the data here: I'm doing a university project on Data Analysis, in particular, I'm trying to analyze the behavior of listeners on Spotify before and during the pandemic.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |