An interactive version of the above visualisation can be found at: https://public.tableau.com/views/NBA_PlayerAnalysis/Nearest_Neighbours?:display_count=y&:origin=viz_share_link

What’s a Nearest Neighbour ?

A Nearest Neighbour, in simple terms, is a data point that is closest/most similar to the data point being analysed. The visualisation above shows Ray Allens’ nearest neighbour is Paul Pierce which means, if you look at the stats of all the players in the NBA (past and present), Pierce comes nearest to Ray Allen.

Use the visualisation provided to select different players and see the nearest 10 neighbours to that player. The closer the player is to the Horizontal axis, the closer he is to the player being analysed.

Method used to analyse and compute distance:

  • NBA players since 1950 have been analysed. Data was sourced from Kaggle and Wikipedia.
  • Data cleansing was done to handle difference in player naming in different files as well as name accents in the case of European players
  • Euclidean distances were computed between Hall of fame players and non- hall of fame players. Results were stored into a Pandas dataframe
  • Tableau Public was used for visualisation

Note:

  • Currently, “Select a Player” filter box lists only Hall of Fame players
  • The Nearest neighbours displayed currently are players who have not been inducted to the Hall of Fame
  • This information is undergoing edits and should not be quoted for commercial purposes

Leave a comment