Stats by player

Top Scorers

Games_Played MIN PTS
Dwyane Wade 79 38.6 30.2
LeBron James 81 37.7 28.4
Kobe Bryant 82 36.2 26.8
Dirk Nowitzki 81 37.7 25.9
Danny Granger 67 36.2 25.8
Kevin Durant 74 39.0 25.3
Kevin Martin 51 38.2 24.6
Chris Paul 78 38.5 22.8
Carmelo Anthony 66 34.5 22.8
Chris Bosh 77 38.1 22.7
Brandon Roy 78 37.2 22.6
Antawn Jamison 81 38.2 22.2
Tony Parker 72 34.1 22.0
Amare Stoudemire 53 36.8 21.4
Joe Johnson 79 39.5 21.4
Devin Harris 69 36.1 21.3
Michael Redd 33 36.4 21.2
---
title: " Heatmap of NBA Players with a lower than or equal to 48% 3 point FG percentage & having more than 20pts"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    source_code: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(knitr)
library(pheatmap)
library(dplyr)
```


```{r,include=FALSE}
url <- "http://datasets.flowingdata.com/ppg2008.csv"
nba_players <- read.csv(url, row.names = 1)
```

```{r,include=FALSE}
# Clustered Heatmap of NBA Players with lower than or equal to 48% 3point percentage
nba_players2 <- nba_players %>% 
  filter(X3PP <=.48,) %>% 
  filter(X3PP > .01) %>% 
  filter(PTS>20) %>% 
  select(-FTA,-FGA) %>% 
  rename(Number3PM = X3PM ) %>% 
  rename(Number3PA = X3PA ) %>% 
  rename(Number3PP = X3PP ) %>%
  rename(Games_Played=G) %>% 
  mutate(FGP=FGP *100,
  Number3PP=Number3PP *100,
  FTP=FTP*100) %>% 
  mutate(Rebounds = ORB + DRB + TRB) %>% 
  select(-c(ORB,DRB,TRB,Number3PA)) %>% 
  relocate(Rebounds, .before='AST')  
  

```



```{r}
```

### Stats by player
```{r}
pheatmap(nba_players2,scale='column')

```

```{r}

```


### Top Scorers 

```{r}
knitr::kable(nba_players2[1:17,c('Games_Played','MIN','PTS')])
```



```{r}

```