Skip to content

v1n99/spotify-music-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

spotify-music-analysis

Spotify's audio features with streaming performance metrics to uncover patterns in successful music.

The Spotify Analyzer is a Python-based tool designed to:

Fetch and analyze the top tracks of popular artists using the Spotify Web API. The analysis includes data on artist name, track name, track popularity, album, release year, and duration.

Provide visualizations and insights into top artist, tracks, streaming trends, and audio features such as danceability, energy, and valence.

image

Requirements:

Python

Spotify Developer Account (https://developer.spotify.com/)

  • Log in to Spotify Developer Dashboard

image

  • Create new application to get Client ID and Client Secret

image

Libraries:

  • spotipy

  • pandas

  • numpy

  • matplotlib

  • seaborn

  • datetime

  • time

  • plotly

image

image

Spotify Top Tracks & Artist Analysis:

  1. Initialize Spotify client by providing Client ID and Client Secret
  2. Define genres and top artists to analyze
    1. Run Analysis and Visualization. The code outputs:

-Combined data in a CSV file (spotify_top_tracks_analysis.csv).

-Summary statistics and top tracks.

-Variety of visuals including box plot and bar chart for popularity and average track duration.

image

Monthly Stream Trends for Top Artists Across Genres:

  1. Convert release date to datetime
  2. Filter data to last two years
  3. Create monthly averages for streams
  4. Get top 10 artists per genre based on total streams
  5. Plot data

image

image

Top Artist’s Average Daily Streams

  1. Filter data to last two years
  2. Create monthly averages for streams
  3. Get the top 10 artists per genre based on total streams
  4. Create a figure with subplots
  5. Add traces for all genre
  6. Add stats table
  7. Create buttons for dropdown (switch genres)
  8. Display figure (interactive)

image

Dashboards:

image

image

Video: https://drive.google.com/file/d/1TFFFYrxsTeveyamYu0zln3lswC0UGJO_/view?ts=67638f28

About

Spotify's audio features with streaming performance metrics to uncover patterns in successful music.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors