Skip to content

This project analyzes music genre preferences across individuals by retrieving genres from Spotify playlists and creating Venn diagrams, t-SNE plots, and UpSet plots.

Notifications You must be signed in to change notification settings

vEonz121/Spotify-Playlist-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Spotify Playlist Analysis

Table of Contents

Overview

This code retrieves the genres of artists included in several Spotify playlists and analyzes music genre preferences across different individuals using Venn diagrams, t-SNE plots, and UpSet plots.

Prerequisites

  • Spotify API credentials
  • spotipy
  • matplotlib
  • matplotlib_venn
  • numpy
  • scikit-learn
  • pandas
  • upsetplot

Setup

Replace the [client ID] and [secret] placeholders with your Spotify API credentials.

client_id = '[client ID]'
client_secret = '[secret]'

Code Explanation

The code retrieves the genres for each artist in each playlist and uses them to update the genre sets for each person. It then creates Venn diagrams to show the unique and common genres for each person. It also applies t-SNE to create a 3D plot that shows the similarities and differences in genre preferences across individuals. Finally, it uses UpSet plots to visualize the overlap between the genres liked by different people.

Results

  • Venn diagrams show the unique and common genres for each person.
  • t-SNE plots show the similarities and differences in genre preferences across individuals.
  • UpSet plots show the overlap between the genres liked by different people.

Usage

  1. Set your Spotify API credentials in the code.
  2. Run the code.
  3. View the generated plots.

Credits

About

This project analyzes music genre preferences across individuals by retrieving genres from Spotify playlists and creating Venn diagrams, t-SNE plots, and UpSet plots.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published