In this section, we want to use our model to predict whether Knicks can get into playoff season in the season of 2021-22. In addition, we plan to use some plots to visualize Knicks’ performance at court and which aspects need to be improved.
top8_east =
prediction_21_22 %>%
head(8) %>%
left_join(new_season_df, by = c("season_year", "team_abbreviation", "conference")) %>%
group_by(season_year) %>%
mutate(ranking = row_number())
top8_east %>%
select(season_year, team_abbreviation, conference, ranking) %>%
knitr::kable("simple")
season_year | team_abbreviation | conference | ranking |
---|---|---|---|
2021-22 | CHA | east | 1 |
2021-22 | BKN | east | 2 |
2021-22 | MIL | east | 3 |
2021-22 | PHI | east | 4 |
2021-22 | ATL | east | 5 |
2021-22 | BOS | east | 6 |
2021-22 | CHI | east | 7 |
2021-22 | NYK | east | 8 |
By arranging the predicted number of winnings, the Knicks is predicted to have 43.6 winnings this season and rank 8 in the season of 2021-22. According to this result, if the Knicks wants to secure a space for playoff season, it has to improve its performance and tries to win more.
Let’s see what Knicks can do to improve its performance and rush into playoff season.
From the plots below, we can conclude that Knicks has to improve its performance in the aspects of turnover and three points. As the model shows, the number of turnover is negatively associated with the number of winning. However, Knicks currently has the second highest number of turnover per game among the top 8 teams in east conference. Besides, its high percentage of three field goal attempt and low three pointer rate among the top 8 of east conference prevent it from getting a good prediction result.
top8_east %>%
ggplot(aes(x = reorder(team_abbreviation, tov_avg), y = tov_avg, fill = team_abbreviation)) +
geom_bar(stat="identity") +
labs(
x = "Team",
y = "Average Turnover per Game",
title = "Top 8 Team Average Turnover (East)"
)
top8_east %>%
ggplot(aes(x = reorder(team_abbreviation, fg3_p), y = fg3_p, fill = team_abbreviation)) +
geom_bar(stat="identity") +
labs(
x = "Team",
y = "Three Pointer Rate",
title = "Top 8 Team Three Field Goal Attempt (East)"
)
top8_east %>%
ggplot(aes(x = reorder(team_abbreviation, fg3_r), y = fg3_r, fill = team_abbreviation)) +
geom_bar(stat="identity") +
labs(
x = "Team",
y = "Three Pointer Rate",
title = "Top 8 Team Three Pointer Rate (East)"
)
top8_east %>%
ggplot(aes(x = reorder(team_abbreviation, stl), y = stl, fill = team_abbreviation)) +
geom_bar(stat="identity") +
labs(
x = "Team",
y = "Average Steal per Game"
)
top8_east %>%
ggplot(aes(x = reorder(team_abbreviation, dreb), y = dreb, fill = team_abbreviation)) +
geom_bar(stat="identity") +
labs(
x = "Team",
y = "Average Defensive Rebound"
)
top8_east %>%
ggplot(aes(x = reorder(team_abbreviation, poss_iso), y = poss_iso, fill = team_abbreviation)) +
geom_bar(stat="identity") +
labs(x = "Team",
y = "Average Isolation")
top8_east %>%
ggplot(aes(x = reorder(team_abbreviation, poss_pr), y = poss_pr, fill = team_abbreviation)) +
geom_bar(stat="identity") +
labs(x = "Team",
y = "Average Pick and Roll")
As three pointer is such a crutial parameter for NBA team to get into playoff season. We decide to look at Knicks’ three pointer shooting data to offer more specific suggestions. In this section, we will compare the overall performance of Knicks to league average, and then, draw the plots for some three pointer team leaders.
In this part, we referred ballr package and Owen’s blog to make the hex plots
library(prismatic)
library(extrafont)
library(cowplot)
p = plot_court(court_themes$light) +
geom_polygon(
data = df,
aes(
x = adj_x,
y = adj_y,
group = hexbin_id,
fill = league_avg_diff,
color = after_scale(clr_darken(fill, .333))),
size = .25) +
scale_x_continuous(limits = c(-27.5, 27.5)) +
scale_y_continuous(limits = c(0, 45)) +
scale_fill_distiller(direction = -1,
palette = "PuOr",
limits = c(-.15, .15),
breaks = seq(-.15, .15, .03),
labels = c("-15%", "-12%", "-9%", "-6%", "-3%", "0%", "+3%", "+6%", "+9%", "+12%", "+15%"),
"3FG Percentage Points vs. League Average") +
guides(fill = guide_legend(
label.position = 'bottom',
title.position = 'top',
keywidth = .45,
keyheight = .15,
default.unit = "inch",
title.hjust = .5,
title.vjust = 0,
label.vjust = 3,
nrow = 1)) +
theme(legend.spacing.x = unit(0, 'cm'),
legend.title = element_text(size = 9),
legend.text = element_text(size = 8),
legend.margin = margin(-10,0,-1,0),
legend.position = 'bottom',
legend.box.margin = margin(-30,0,15,0),
plot.title = element_text(hjust = 0.5, vjust = -1, size = 15),
plot.subtitle = element_text(hjust = 0.5, size = 8, vjust = -.5),
plot.caption = element_text(face = "italic", size = 8),
plot.margin = margin(0, -5, 0, -5, "cm")) +
labs(title = "New York Knicks - Three Point",
subtitle = "2021-22 Regular Season")
ggdraw(p) +
theme(plot.background = element_rect(fill="floralwhite", color = NA))
According to this hex plot, in the 2021-2022 regular season, The Knicks has a better performance in three-point field goal at both of the wing area compared to league average. And it has a equal performance with the league average at the head of the key area. However, the Knicks performs worse at the both corner area compared to the league average. To be more specific, the three pointer percentage at right wing is 6% higher than the league average. At left wing, the three pointer percentage is 3% higher than the league average. On the other hand, the team’s three pointer percentage is 6% and 3% lower than the league average in the right and left corners respectively. Therefore, the Knicks should deploy more three field goal tactics at left and right wing areas. And the shooting ability at corner area should be further strengthened through training.
As to further understand what tactic the Knicks can deploy, we decide to look at the shooting log of three pointer team leaders in Knicks, including Alec Burks, Kemba Walker and Derrick Rose, who have the highest three pointer rate in Knicks.
The performance of Knicks team leaders in three pointer is in accordance with the performance of the whole team. In the 2021-22 season, none of the team leaders performs better than the league average in both of the corner area.However, it is more likely for them to make three point at both wings. Therefore, we think the coach should deploy more tactics for the team leaders at wing area. And the players should make less shot attempt in a play at the corner but get more training in shooting at this area.
alec_p =
plot_court(court_themes$light) +
geom_polygon(
data = alec_df,
aes(
x = hex_data.adj_x,
y = hex_data.adj_y,
group = hex_data.hexbin_id,
fill = hex_data.league_avg_diff,
color = after_scale(clr_darken(fill, .333))),
size = .25) +
scale_x_continuous(limits = c(-27.5, 27.5)) +
scale_y_continuous(limits = c(0, 45)) +
scale_fill_distiller(direction = -1,
palette = "PuOr",
limits = c(-.15, .15),
breaks = seq(-.15, .15, .03),
labels = c("-15%", "-12%", "-9%", "-6%", "-3%", "0%", "+3%", "+6%", "+9%", "+12%", "+15%"),
"3FG Percentage Points vs. League Average") +
guides(fill = guide_legend(
label.position = 'bottom',
title.position = 'top',
keywidth = .45,
keyheight = .15,
default.unit = "inch",
title.hjust = .5,
title.vjust = 0,
label.vjust = 3,
nrow = 1)) +
theme(legend.spacing.x = unit(0, 'cm'),
legend.title = element_text(size = 9),
legend.text = element_text(size = 8),
legend.margin = margin(-10,0,-1,0),
legend.position = 'bottom',
legend.box.margin = margin(-30,0,15,0),
plot.title = element_text(hjust = 0.5, vjust = -1, size = 15),
plot.subtitle = element_text(hjust = 0.5, size = 8, vjust = -.5),
plot.caption = element_text(face = "italic", size = 8),
plot.margin = margin(0, -5, 0, -5, "cm")) +
labs(title = "Alec Burks - Three Point",
subtitle = "2021-22 Regular Season")
ggdraw(alec_p) +
theme(plot.background = element_rect(fill="floralwhite", color = NA))
walker_p =
plot_court(court_themes$light) +
geom_polygon(
data = walker_df,
aes(
x = hex_data.adj_x,
y = hex_data.adj_y,
group = hex_data.hexbin_id,
fill = hex_data.league_avg_diff,
color = after_scale(clr_darken(fill, .333))),
size = .25) +
scale_x_continuous(limits = c(-27.5, 27.5)) +
scale_y_continuous(limits = c(0, 45)) +
scale_fill_distiller(direction = -1,
palette = "PuOr",
limits = c(-.15, .15),
breaks = seq(-.15, .15, .03),
labels = c("-15%", "-12%", "-9%", "-6%", "-3%", "0%", "+3%", "+6%", "+9%", "+12%", "+15%"),
"3FG Percentage Points vs. League Average") +
guides(fill = guide_legend(
label.position = 'bottom',
title.position = 'top',
keywidth = .45,
keyheight = .15,
default.unit = "inch",
title.hjust = .5,
title.vjust = 0,
label.vjust = 3,
nrow = 1)) +
theme(legend.spacing.x = unit(0, 'cm'),
legend.title = element_text(size = 9),
legend.text = element_text(size = 8),
legend.margin = margin(-10,0,-1,0),
legend.position = 'bottom',
legend.box.margin = margin(-30,0,15,0),
plot.title = element_text(hjust = 0.5, vjust = -1, size = 15),
plot.subtitle = element_text(hjust = 0.5, size = 8, vjust = -.5),
plot.caption = element_text(face = "italic", size = 8),
plot.margin = margin(0, -5, 0, -5, "cm")) +
labs(title = "Kemba Walker - Three Point",
subtitle = "2021-22 Regular Season")
ggdraw(walker_p) +
theme(plot.background = element_rect(fill="floralwhite", color = NA))
rose_p =
plot_court(court_themes$light) +
geom_polygon(
data = rose_df,
aes(
x = hex_data.adj_x,
y = hex_data.adj_y,
group = hex_data.hexbin_id,
fill = hex_data.league_avg_diff,
color = after_scale(clr_darken(fill, .333))),
size = .25) +
scale_x_continuous(limits = c(-27.5, 27.5)) +
scale_y_continuous(limits = c(0, 45)) +
scale_fill_distiller(direction = -1,
palette = "PuOr",
limits = c(-.15, .15),
breaks = seq(-.15, .15, .03),
labels = c("-15%", "-12%", "-9%", "-6%", "-3%", "0%", "+3%", "+6%", "+9%", "+12%", "+15%"),
"3FG Percentage Points vs. League Average") +
guides(fill = guide_legend(
label.position = 'bottom',
title.position = 'top',
keywidth = .45,
keyheight = .15,
default.unit = "inch",
title.hjust = .5,
title.vjust = 0,
label.vjust = 3,
nrow = 1)) +
theme(legend.spacing.x = unit(0, 'cm'),
legend.title = element_text(size = 9),
legend.text = element_text(size = 8),
legend.margin = margin(-10,0,-1,0),
legend.position = 'bottom',
legend.box.margin = margin(-30,0,15,0),
plot.title = element_text(hjust = 0.5, vjust = -1, size = 15),
plot.subtitle = element_text(hjust = 0.5, size = 8, vjust = -.5),
plot.caption = element_text(face = "italic", size = 8),
plot.margin = margin(0, -5, 0, -5, "cm")) +
labs(title = "Derrick Rose - Three Point",
subtitle = "2021-22 Regular Season")
ggdraw(rose_p) +
theme(plot.background = element_rect(fill="floralwhite", color = NA))