NBA positions dataset clustered using k-means with a range of values of k



nba_clusts is a data.frame containing the NBA positions dataset with additional columns holding k-means clusterings at different values of k and the first two principal components

  • Position - Player position

  • TurnoverPct - Turnover percentage

  • ReboundPct - Rebound percentage

  • AssistPct - Assist percentage

  • FieldGoalPct - Field goal percentage

  • K1 - K5 - Results of k-means clustering

  • PC1 - First principal component

  • PC2 - Second principal component


NBA positions downloaded from

The source dataset is available from Kaggle at and was originally scraped from Basketball Reference.

See for details of how clustering was performed.