東契奇到底有多棒?
- 2020 年 3 月 3 日
- 筆記
瀏覽kaggle的時候發現了一個非常有意思的案例 How good is Kuka Doncic? (東契奇到底有多棒?);原文地址 https://www.kaggle.com/xvivancos/how-good-is-luka-doncic。主要內容是通過可視化的手段展示東契奇的職業生涯開始到現在的數據。分析過程使用了R語言的tidyverse,ggplot2和ggpubr包。這對於喜歡籃球和正在學習R語言的自己來說是絕佳的學習素材,以下內容記錄自己重複這篇kaggle案例的過程
東契奇是誰?

19歲的斯洛文尼亞帥小伙,2018-19賽季NBA探花秀;加入NBA之前已經名滿天下:8歲在五線隊打了一個小時就讓教練給送11歲年齡組;13歲簽約皇馬;16歲打成年人職業隊;17歲名滿歐洲;18歲率領斯洛文尼亞奪取歐洲冠軍;19歲包攬歐洲所有團隊、個人榮譽;(以上內容摘自楊毅侃球公眾號)。我們再來看看加入NBA以後取得的成就:NBA歷史上最年輕的30+三雙(triple-double)獲得者;First teenagert in NBA history with multiple triple-doubles(這句話沒有想好怎麼翻譯);第七個20歲之前拿到1000分的運動員,排在他之前的是誰:詹姆斯、杜蘭特、安東尼、科比、德文布克、霍華德(were the previous one);菜鳥(rookie)賽季全明星票選總得票數排名第三,稍微有點遺憾的是因為球迷、媒體、球員投票佔比問題沒有能夠入選全明星。
NBA眾位大佬對東契奇的評價
國家隊隊友,熱火隊後衛德拉季奇(Goran Dragic)

He's a born winner. No, I'm not kidding, he already has a lot of trophies, and medals. I'm happy fo him. Mark my words, he's going to be one of the best in the whole world. 他生而為贏,我沒有開玩笑,他已經拿了無數的獎盃獎章(trophies and medals)。我為他感到高興,記住我的話,他將會成為世界上最好的球員之一。
小牛隊隊友諾維茨基(Dirk Nowitzki)

He's an incredible talent. His court vision and passing for his size at his age is something I've never seen in my 20 years. 驚人的天賦,他的球場視野和傳球在我20年的生涯中前所未見
勇士球星凱文杜蘭特(Kevin Durant)

I like him a lot. He's polished. He's skilled. You can tell that he played professional basketball already and they've got a great guy in him to lead this franchise in the future.
小牛隊主教練卡萊爾(Rick Carlisle)

For a 19-year-old, he's got a realy unusual comnination of size, speed, and deceptive quickness.
勇士球星庫里(Stephen Curry)

He's a rookie, but he's found a way to impose his will most nights, and it's going to be good to see him develop in this league and a star.
那麼問題來了–東契奇的上限在哪裡呢?(the question is: What is the celling for Luka Doncic?)

接下來就來看一下東契奇職業生涯(professional career)至今的數據
2015-2018年皇家馬德里(Real Madrid)
2012年9月(In September 2012)13歲的東契奇和皇馬簽了五年合同(signed a five-year contract with Real Madrid),然而到2015年才開始打職業聯賽(However, he didn't play professionally until 2015)下面主要分析東契奇作為皇馬球員在聯賽(Liga ACB)和歐冠(EuroLeague)中的表現;The Liga ACB is the top professional basketball division of the Spanish basketball league system;這裡的division是部門的意思 2015年4月30號(On April 30, 2015),東契奇職業生涯首秀(made his professional debut for Real Madrid),這一年他16歲兩個月零2天。
首先是一些比較重要的指標:得分、助攻、籃板
##2019年2月14號 install.packages("tidyverse") library(tidyverse) library(ggpubr) library(ggplot2) setwd("../Desktop/data_analysis_practice/Lork/") ACBstats <- read.csv("Liga ACB stats.csv", sep=",", fileEncoding="UTF-8") colnames(ACBstats)[c(5, 10, 11, 12, 13, 14, 15, 16, 19)] <- c("Regular Season/Playoffs", "FG%", "3P", "3PA", "3P%", "2P", "2PA", "2P%", "FT%") ACBstats %>% rename(Assists=AST, Points=PTS, Rebounds=TRB) %>% gather(Category, Value, c(22, 23, 28)) %>% ggplot(aes(x=Season, y=Value, color=`Regular Season/Playoffs`, group=`Regular Season/Playoffs`)) + geom_line() + geom_point(size=2) + facet_wrap(~Category, scales="free") + theme_bw() + labs(title="Luka Doncic stats - Liga ACB", subtitle="Assists, Points and Rebounds") + theme(axis.text.x=element_text(angle=45, hjust=1), legend.position="bottom", legend.title=element_blank(), axis.title.y=element_blank())

由上圖可以看出,東契奇的這三項數據逐年穩定上升,季後賽表現稍遜於常規賽
接下來看命中率
ACBstats %>% gather(Category, Value, c(13, 16, 19)) %>% ggplot(aes(x=Season, y=Value, color=`Regular Season/Playoffs`, group=`Regular Season/Playoffs`)) + geom_line() + geom_point(size=2) + facet_wrap(~Category, scales="free") + theme_bw() + labs(title="Luka Doncic stats - Liga ACB", subtitle="2P%, 3P% and FT%") + scale_y_continuous(labels = scales::percent) + theme(axis.text.x=element_text(angle=45, hjust=1), legend.position="bottom", legend.title=element_blank(), axis.title.y=element_blank())

命中率好像不太穩定
接着是得分、助攻、籃板的場次分佈
ACBmatches <- read.csv("Liga ACB matches.csv", sep=",", fileEncoding="UTF-8") colnames(ACBmatches)[c(7, 11, 12, 13, 14, 17)] <- c("Result", "FG%", "3P", "3PA", "3P%", "FT%") ACBmatches %>% rename(Assists=AST, Points=PTS, Rebounds=TRB) %>% gather(Category, Value, c(20, 21, 26)) %>% ggplot(aes(x=Value, fill=Category)) + geom_histogram(stat="count", show.legend=FALSE) + facet_wrap(~Category, scales="free") + theme_bw() + labs(title="Luka Doncic stats - Liga ACB", subtitle="Assists, Points and Rebounds (2015-2018)", y="Count") + theme(axis.title.x=element_blank())

那麼問題又來了,哪支球隊是東契奇最喜歡的對手,在哪支球隊頭上拿到的分數最多?
ACBmatches %>% group_by(Opponent) %>% summarise(Points=sum(PTS)) %>% arrange(desc(Points)) %>% head(n=10) %>% ggplot(aes(x=reorder(Opponent, -Points), y=Points)) + geom_bar(aes(fill=Points), stat="identity", show.legend=FALSE) + geom_label(aes(label=Points)) + scale_fill_gradient(low="paleturquoise", high="paleturquoise4") + labs(title="Luka Doncic stats - Liga ACB", subtitle="He has scored more points against...", x="Team") + theme_bw() + theme(axis.text.x=element_text(angle=45, hjust=1))
