Who is the most clutch Player since the last decade? Everyone in the basketball world ponders over this question and has their own personal favourite. Who do you give the ball to in crunch time and trust that ine player to take you to the end of the line? Let’s try and find what the Analytics part of it tries to accomplish. We have gathered data for seven players who were/are said to be the best of the best in crunch time since the last 20 years. The seven Players which have been used in this data analysis are,

Some important Basketball terms that will be used in the documentation are given below.

First, all the needed libraries will be loaded in the code.

library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5     v purrr   0.3.4
## v tibble  3.1.2     v dplyr   1.0.7
## v tidyr   1.1.3     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(nbastatR)
library(fmsb)
library(hrbrthemes)
## NOTE: Either Arial Narrow or Roboto Condensed fonts are required to use these themes.
##       Please use hrbrthemes::import_roboto_condensed() to install Roboto Condensed and
##       if Arial Narrow is not on your system, please see https://bit.ly/arialnarrow
library(colormap)

The required data will be extracted using the nbastatR package with the function teams_players_stats() and will be stored in a dataframe called ‘clutch’.

clutch <- teams_players_stats(seasons = c(1990:2022), types = c("player"),
                              modes = c( "Totals"),
                              tables = c("clutch"), clutch_times = c("Last 2 Minutes", "Last 1 Minute", "Last 30 seconds", "Last 10 Seconds"))
## Acquiring all player Totals clutch Base split tables for the 1989-90 season
## Acquiring all player Totals clutch Base split tables for the 1990-91 season
## Acquiring all player Totals clutch Base split tables for the 1991-92 season
## Acquiring all player Totals clutch Base split tables for the 1992-93 season
## Acquiring all player Totals clutch Base split tables for the 1993-94 season
## Acquiring all player Totals clutch Base split tables for the 1994-95 season
## Acquiring all player Totals clutch Base split tables for the 1995-96 season
## Acquiring all player Totals clutch Base split tables for the 1996-97 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1997-98 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1998-99 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1999-00 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2000-01 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2001-02 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2002-03 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2003-04 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2004-05 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2005-06 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2006-07 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2007-08 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2008-09 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2009-10 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2010-11 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2011-12 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2012-13 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2013-14 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2014-15 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2015-16 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2016-17 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2017-18 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2018-19 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2019-20 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2020-21 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2021-22 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1989-90 season
## Acquiring all player Totals clutch Base split tables for the 1990-91 season
## Acquiring all player Totals clutch Base split tables for the 1991-92 season
## Acquiring all player Totals clutch Base split tables for the 1992-93 season
## Acquiring all player Totals clutch Base split tables for the 1993-94 season
## Acquiring all player Totals clutch Base split tables for the 1994-95 season
## Acquiring all player Totals clutch Base split tables for the 1995-96 season
## Acquiring all player Totals clutch Base split tables for the 1996-97 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1997-98 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1998-99 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1999-00 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2000-01 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2001-02 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2002-03 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2003-04 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2004-05 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2005-06 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2006-07 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2007-08 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2008-09 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2009-10 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2010-11 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2011-12 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2012-13 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2013-14 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2014-15 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2015-16 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2016-17 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2017-18 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2018-19 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2019-20 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2020-21 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2021-22 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1989-90 season
## Acquiring all player Totals clutch Base split tables for the 1990-91 season
## Acquiring all player Totals clutch Base split tables for the 1991-92 season
## Acquiring all player Totals clutch Base split tables for the 1992-93 season
## Acquiring all player Totals clutch Base split tables for the 1993-94 season
## Acquiring all player Totals clutch Base split tables for the 1994-95 season
## Acquiring all player Totals clutch Base split tables for the 1995-96 season
## Acquiring all player Totals clutch Base split tables for the 1996-97 season
## Acquiring all player Totals clutch Base split tables for the 1997-98 season
## Acquiring all player Totals clutch Base split tables for the 1998-99 season
## Acquiring all player Totals clutch Base split tables for the 1999-00 season
## Acquiring all player Totals clutch Base split tables for the 2000-01 season
## Acquiring all player Totals clutch Base split tables for the 2001-02 season
## Acquiring all player Totals clutch Base split tables for the 2002-03 season
## Acquiring all player Totals clutch Base split tables for the 2003-04 season
## Acquiring all player Totals clutch Base split tables for the 2004-05 season
## Acquiring all player Totals clutch Base split tables for the 2005-06 season
## Acquiring all player Totals clutch Base split tables for the 2006-07 season
## Acquiring all player Totals clutch Base split tables for the 2007-08 season
## Acquiring all player Totals clutch Base split tables for the 2008-09 season
## Acquiring all player Totals clutch Base split tables for the 2009-10 season
## Acquiring all player Totals clutch Base split tables for the 2010-11 season
## Acquiring all player Totals clutch Base split tables for the 2011-12 season
## Acquiring all player Totals clutch Base split tables for the 2012-13 season
## Acquiring all player Totals clutch Base split tables for the 2013-14 season
## Acquiring all player Totals clutch Base split tables for the 2014-15 season
## Acquiring all player Totals clutch Base split tables for the 2015-16 season
## Acquiring all player Totals clutch Base split tables for the 2016-17 season
## Acquiring all player Totals clutch Base split tables for the 2017-18 season
## Acquiring all player Totals clutch Base split tables for the 2018-19 season
## Acquiring all player Totals clutch Base split tables for the 2019-20 season
## Acquiring all player Totals clutch Base split tables for the 2020-21 season
## Acquiring all player Totals clutch Base split tables for the 2021-22 season
## Acquiring all player Totals clutch Base split tables for the 1989-90 season
## Acquiring all player Totals clutch Base split tables for the 1990-91 season
## Acquiring all player Totals clutch Base split tables for the 1991-92 season
## Acquiring all player Totals clutch Base split tables for the 1992-93 season
## Acquiring all player Totals clutch Base split tables for the 1993-94 season
## Acquiring all player Totals clutch Base split tables for the 1994-95 season
## Acquiring all player Totals clutch Base split tables for the 1995-96 season
## Acquiring all player Totals clutch Base split tables for the 1996-97 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1997-98 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1998-99 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 1999-00 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2000-01 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2001-02 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2002-03 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2003-04 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2004-05 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2005-06 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2006-07 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2007-08 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2008-09 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2009-10 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2010-11 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2011-12 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2012-13 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2013-14 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2014-15 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2015-16 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2016-17 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2017-18 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2018-19 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2019-20 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2020-21 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary
## Acquiring all player Totals clutch Base split tables for the 2021-22 season
## Missing WNBA_FANTASY_PTS in dictionary
## Missing WNBA_FANTASY_PTS_RANK in dictionary

The data obtained from the above function is grouped into many dataframes. So the required data for analysis is extracted and bound together for easier data manipulation. The rbind() function is used for binding together the necessary dataframes.

clutch1 <- rbind((clutch[[7]][[1]]), (clutch[[7]][[2]]), (clutch[[7]][[3]]), (clutch[[7]][[4]]), (clutch[[7]][[5]]),
                 (clutch[[7]][[6]]), (clutch[[7]][[7]]), (clutch[[7]][[8]]), (clutch[[7]][[9]]), (clutch[[7]][[10]]),
                 (clutch[[7]][[11]]), (clutch[[7]][[12]]), (clutch[[7]][[13]]), (clutch[[7]][[14]]), (clutch[[7]][[15]]),
                 (clutch[[7]][[16]]), (clutch[[7]][[17]]), (clutch[[7]][[18]]), (clutch[[7]][[19]]), (clutch[[7]][[20]]),
                 (clutch[[7]][[21]]), (clutch[[7]][[22]]), (clutch[[7]][[23]]), (clutch[[7]][[24]]), (clutch[[7]][[25]]),
                 (clutch[[7]][[26]]), (clutch[[7]][[27]]), (clutch[[7]][[28]]), (clutch[[7]][[29]]), (clutch[[7]][[30]]),
                 (clutch[[7]][[31]]), (clutch[[7]][[32]]), (clutch[[7]][[33]]), (clutch[[7]][[34]]), (clutch[[7]][[35]]),
                 (clutch[[7]][[36]]), (clutch[[7]][[37]]), (clutch[[7]][[38]]), (clutch[[7]][[39]]), (clutch[[7]][[40]]),
                 (clutch[[7]][[41]]), (clutch[[7]][[42]]), (clutch[[7]][[43]]), (clutch[[7]][[44]]), (clutch[[7]][[45]]),
                 (clutch[[7]][[46]]), (clutch[[7]][[47]]), (clutch[[7]][[48]]), (clutch[[7]][[49]]), (clutch[[7]][[50]]), 
                 (clutch[[7]][[51]]), (clutch[[7]][[52]]), (clutch[[7]][[53]]), (clutch[[7]][[54]]), (clutch[[7]][[55]]),
                 (clutch[[7]][[56]]), (clutch[[7]][[57]]), (clutch[[7]][[58]]), (clutch[[7]][[59]]), (clutch[[7]][[60]]),
                 (clutch[[7]][[61]]), (clutch[[7]][[62]]), (clutch[[7]][[63]]), (clutch[[7]][[64]]), (clutch[[7]][[65]]), 
                 (clutch[[7]][[66]]), (clutch[[7]][[67]]), (clutch[[7]][[68]]), (clutch[[7]][[69]]), (clutch[[7]][[70]]),
                 (clutch[[7]][[71]]), (clutch[[7]][[72]]), (clutch[[7]][[73]]), (clutch[[7]][[74]]), (clutch[[7]][[75]]),
                 (clutch[[7]][[76]]), (clutch[[7]][[77]]), (clutch[[7]][[78]]))

View of the above dataframe

head(clutch1)
## # A tibble: 6 x 81
##   typeMeasure isPlusMinus isPaceAdjust isRank idPlayoffRound idMonth
##   <chr>       <lgl>       <lgl>        <lgl>           <int>   <int>
## 1 Base        FALSE       FALSE        FALSE               0       0
## 2 Base        FALSE       FALSE        FALSE               0       0
## 3 Base        FALSE       FALSE        FALSE               0       0
## 4 Base        FALSE       FALSE        FALSE               0       0
## 5 Base        FALSE       FALSE        FALSE               0       0
## 6 Base        FALSE       FALSE        FALSE               0       0
## # ... with 75 more variables: idTeamOpponent <int>, idPeriod <int>,
## #   countLastNGames <int>, categoryClutchTime <chr>, categoryAheadBehind <chr>,
## #   ptsDifference <int>, namePlayer <chr>, nameTeam <chr>, slugTeam <chr>,
## #   idPlayer <dbl>, idTeam <dbl>, gp <dbl>, pctWins <dbl>, fgm <dbl>,
## #   fga <dbl>, pctFG <dbl>, fg3m <dbl>, fg3a <dbl>, pctFG3 <dbl>, pctFT <dbl>,
## #   gpRank <dbl>, pctWinsRank <dbl>, minutesRank <dbl>, fgmRank <dbl>,
## #   fgaRank <dbl>, pctFGRank <dbl>, fg3mRank <dbl>, fg3aRank <dbl>,
## #   pctFG3Rank <dbl>, pctFTRank <dbl>, fg2m <dbl>, fg2a <dbl>, pctFG2 <dbl>,
## #   agePlayer <dbl>, wins <dbl>, losses <dbl>, minutes <dbl>, ftm <dbl>,
## #   fta <dbl>, oreb <dbl>, dreb <dbl>, treb <dbl>, ast <dbl>, tov <dbl>,
## #   stl <dbl>, blk <dbl>, blka <dbl>, pf <dbl>, pfd <dbl>, pts <dbl>,
## #   plusminus <dbl>, fptsNBAActual <dbl>, dd2 <dbl>, td3 <dbl>,
## #   WNBA_FANTASY_PTS <dbl>, winsRank <dbl>, lossesRank <dbl>, rankFTM <dbl>,
## #   rankFTA <dbl>, orebRank <dbl>, drebRank <dbl>, trebRank <dbl>,
## #   astRank <dbl>, tovRank <dbl>, stlRank <dbl>, blkRank <dbl>, blkaRank <dbl>,
## #   pfRank <dbl>, pfdRank <dbl>, ptsRank <dbl>, plusminusRank <dbl>,
## #   fptsRank <dbl>, dd2Rank <dbl>, td3Rank <dbl>, WNBA_FANTASY_PTS_RANK <dbl>

The analysis topic says the clutch gene so the required columns will be extracted from the data frame for further analysis.

clutch1 <- clutch1 %>% select(categoryClutchTime, namePlayer, gp, fgm, fga, wins, losses, minutes)

Now the required players that were mentioned at the top of the documentation will be used in the analysis. Their information will be extracted using the pipe function and filter() function.

kobe <- clutch1 %>% filter(namePlayer == "Kobe Bryant")
kd <- clutch1 %>% filter(namePlayer == "Kevin Durant")
lebron <- clutch1 %>% filter(namePlayer == "LeBron James")
dame <- clutch1 %>% filter(namePlayer == "Damian Lillard")
steph <- clutch1 %>% filter(namePlayer == "Stephen Curry")
dirk <- clutch1 %>% filter(namePlayer == "Dirk Nowitzki")
paul <- clutch1 %>% filter(namePlayer == "Paul Pierce")

For example, One data frame is given below for example

head(kobe)
## # A tibble: 6 x 8
##   categoryClutchTime namePlayer     gp   fgm   fga  wins losses minutes
##   <chr>              <chr>       <dbl> <dbl> <dbl> <dbl>  <dbl>   <dbl>
## 1 Last 2 Minutes     Kobe Bryant    13     3     8     6      7    11.0
## 2 Last 2 Minutes     Kobe Bryant    25     6    18    13     12    38.8
## 3 Last 2 Minutes     Kobe Bryant    26     8    19    15     11    34.6
## 4 Last 2 Minutes     Kobe Bryant    25    11    24    19      6    46.3
## 5 Last 2 Minutes     Kobe Bryant    33    30    64    21     12    65.9
## 6 Last 2 Minutes     Kobe Bryant    34    18    45    19     15    58.5

Our main goal is to compare all these players using some features which were extracted in the aboce dataframe so as to create a spiderchart. Spidercharts are useful in comparing features of certain elements. so the next code chunk is used to create a dataframe for each player containing the sum of all the features. We will be using the category of the Crunch time of 1 minute as in the shots made and missed by the player in the last minute of the game.

## Crunch Times (Last 1 Minute)

## Kobe Bryant

kobelastmin <-  kobe %>% filter(categoryClutchTime == "Last 1 Minute")
kobelastmins <- kobelastmin %>% select(fgm, fga, wins, losses)
kobelastmins <- rbind(kobelastmins, colSums(kobelastmins[1:20,]), colSums(kobelastmins))
kobelastmins <- kobelastmins[21, 1:4]
kobe1 <- kobelastmin[1, 1:2]
kobefinal <- cbind(kobe1, kobelastmins)
rm(kobelastmin, kobelastmins)

## Kevin Durant

kobelastmin <-  kd %>% filter(categoryClutchTime == "Last 1 Minute")
kobelastmins <- kobelastmin %>% select(fgm, fga, wins, losses)
kobelastmins <- rbind(kobelastmins, colSums(kobelastmins[1:14,]), colSums(kobelastmins))
kobelastmins <- kobelastmins[15, 1:4]
kobe1 <- kobelastmin[1, 1:2]
kdfinal <- cbind(kobe1, kobelastmins)
rm(kobelastmin, kobelastmins)

## LeBron James

kobelastmin <-  lebron %>% filter(categoryClutchTime == "Last 1 Minute")
kobelastmins <- kobelastmin %>% select(fgm, fga, wins, losses)
kobelastmins <- rbind(kobelastmins, colSums(kobelastmins[1:19,]), colSums(kobelastmins))
kobelastmins <- kobelastmins[20, 1:4]
kobe1 <- kobelastmin[1, 1:2]
lbjfinal <- cbind(kobe1, kobelastmins)
rm(kobelastmin, kobelastmins)

## Damian Lillard

kobelastmin <-  dame %>% filter(categoryClutchTime == "Last 1 Minute")
kobelastmins <- kobelastmin %>% select(fgm, fga, wins, losses)
kobelastmins <- rbind(kobelastmins, colSums(kobelastmins[1:10,]), colSums(kobelastmins))
kobelastmins <- kobelastmins[11, 1:4]
kobe1 <- kobelastmin[1, 1:2]
damefinal <- cbind(kobe1, kobelastmins)
rm(kobelastmin, kobelastmins)


##Stephen Curry

kobelastmin <-  steph %>% filter(categoryClutchTime == "Last 1 Minute")
kobelastmins <- kobelastmin %>% select(fgm, fga, wins, losses)
kobelastmins <- rbind(kobelastmins, colSums(kobelastmins[1:13,]), colSums(kobelastmins))
kobelastmins <- kobelastmins[14, 1:4]
kobe1 <- kobelastmin[1, 1:2]
stephfinal <- cbind(kobe1, kobelastmins)
rm(kobelastmin, kobelastmins)


##Dirk Nowitzki

kobelastmin <-  dirk %>% filter(categoryClutchTime == "Last 1 Minute")
kobelastmins <- kobelastmin %>% select(fgm, fga, wins, losses)
kobelastmins <- rbind(kobelastmins, colSums(kobelastmins[1:21,]), colSums(kobelastmins))
kobelastmins <- kobelastmins[22, 1:4]
kobe1 <- kobelastmin[1, 1:2]
dirkfinal <- cbind(kobe1, kobelastmins)
rm(kobelastmin, kobelastmins)


##Paul Pierce

kobelastmin <-  paul %>% filter(categoryClutchTime == "Last 1 Minute")
kobelastmins <- kobelastmin %>% select(fgm, fga, wins, losses)
kobelastmins <- rbind(kobelastmins, colSums(kobelastmins[1:19,]), colSums(kobelastmins))
kobelastmins <- kobelastmins[20, 1:4]
kobe1 <- kobelastmin[1, 1:2]
paulfinal <- cbind(kobe1, kobelastmins)
rm(kobelastmin, kobelastmins)

After creating the dataframes for all the players, the dataframes are binded into one using the rbind() function again.

final <- rbind(kobefinal, kdfinal, dirkfinal, damefinal, stephfinal, paulfinal, lbjfinal)

View of the above dataframe

head(final)
##   categoryClutchTime     namePlayer fgm fga wins losses
## 1      Last 1 Minute    Kobe Bryant 195 560  306    224
## 2      Last 1 Minute   Kevin Durant 126 370  200    167
## 3      Last 1 Minute  Dirk Nowitzki 151 346  342    255
## 4      Last 1 Minute Damian Lillard 107 295  165    142
## 5      Last 1 Minute  Stephen Curry  77 218  155    120
## 6      Last 1 Minute    Paul Pierce 127 382  323    276

To create a spiderplot, the required features are extracted from the ‘final’ dataframe using select() function. Also, the maximum and the minimum values are binded in the dataframe using the rep() function so as to use the plot.

radar <- final %>% select(fgm, fga, wins, losses)
radar <-rbind(rep(600,5), rep(70,5), radar)

The next part is the creation of the SpiderPlot using the ‘radar’ dataframe. All the comments are added above a specific code line to understand it’s function.

# Prepare color
colors_border=colormap(colormap=colormaps$viridis, nshades=7, alpha=1)
colors_in=colormap(colormap=colormaps$viridis, nshades=7, alpha=0.3)

# Prepare title
mytitle <- c("Kobe Bryant", "Kevin Durant", "Dirk Nowitzki", "Damian Lillard", "Stephen Curry", "Paul Pierce", "LeBron James")

# Split the screen in 6 parts
par(mar=rep(0.8,4))
par(mfrow=c(3,3))

# Loop for each plot
for(i in 1:7){
  
  # Custom the radarChart !
  radarchart( radar[c(1,2,i+2),], axistype=0, 
              
              #custom polygon
              pcol=colors_border[i] , pfcol=colors_in[i] , plwd=2, plty=1 , 
              
              #custom the grid
              cglcol="grey", cglty=1, axislabcol="grey", caxislabels= 0, cglwd=1.0,
              
              #custom labels
              vlcex=0.8,
              
              #title
              title=mytitle[i]
  )
}

Now we can see from the visualization that Stephen Curry is the least clutch among the seven players as he has very low FGM and a decent amount of FGA. The interesting observation is that the plots of Kobe Bryant and LeBron James are pretty neck to neck and quite similiar. So to compare them and to find out who is the most clutch player in the last minute of the game, we extract features of Kobe and LeBron and bind them into a dataframe. After the data is put together, a spiderplot is created where both the players are in a single plot to make the comparison much easier.

{

## Kobe Bryant and Lebron James

clutchest <- final %>% filter(namePlayer == "LeBron James")
clutchest1 <- final %>% filter(namePlayer == "Kobe Bryant")
clutchest <- rbind(clutchest, clutchest1)
clutchest <- clutchest[1:2, 3:6]
clutchest <- rbind(rep(600,5), rep(180,5), clutchest)


colors_border=c( rgb(0.2,0.5,0.5,0.9), rgb(0.8,0.2,0.5,0.9)  )
colors_in=c( rgb(0.2,0.5,0.5,0.4), rgb(0.8,0.2,0.5,0.4)  )

## Radarplot
radarchart( clutchest, axistype=0, 
            
            #custom polygon
            pcol=colors_border , pfcol=colors_in , plwd=2, plty=1, 
            
            #custom the grid
            cglcol="grey", cglty=1, axislabcol="grey", caxislabels=0, cglwd=1.0,
            
            #custom labels
            vlcex=0.8 
)

# Legend
legend(x=1, y=1.4, legend = c("Lebron James", "Kobe Bryant"), bty = "n", pch= 20 , col=colors_border , text.col = "black", cex=0.9, pt.cex=1.6)
rm(clutchest, clutchest1)

}

As we can see from the visualization, LeBron James has more FGMs and Wins and less losses as well than Kobe Bryant . The Data thus suggests that when it comes to the final minute of the game, LeBron James is the most clutch Player in the NBA since the last 20 years.