Skip to content

Peakergzf/erdos-number-for-rappers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erdős Number for Rappers

a.k.a. Young Thug Number

Erdős Number

Consider the collaboration graph of mathematicians, where each vertex represents a mathematician and two vertices are adjacent if the they coauthored a paper. Erdős number of a mathematician is defined as their distance to Paul Erdős in the graph.

Collaboration Graph of Rappers

Similarly, we can define the collaboration graph of rappers, where each vertex represents a rapper and two vertices are adjacent if the they collaborated on a song.

spotipy and networkx are used to construct the graph and pyvis is used to visualize the graph. Due to the huge number of rappers, only "mainstream" rappers are included in the graph and this is determined by the "popularity" attribute of each artist provided by Spotify. (Below are screenshots of the graph visualized.)

Young Thug Number

The center of a graph is the set of vertices of eccentricity equal to the graph radius. In the rappers collaboration graph, there are multiple vertices in the center with eccentricity 3. Young Thug is chosen as our Erdős and the Young Thug Number of a rapper is defined as their distance to Young Thug in the graph.

Young Thug Number # rappers
0 1
1 42
2 76
3 3

Rappers collaborate more often than artists in any other genres and the featuring phenomenon is bigger than ever. From the distribution of Young Thug Number above we can see that he has collaborated with at least 42 rappers and other 76 rappers are just two collaborations away from him.


🙌

Releases

No releases published

Packages

No packages published

Languages