写在前面的话
莎士比亚说过:“一千个人眼里有一千个哈姆雷特。” 这就像不同的球迷心中都有自己心爱的球星与球队。
在NBA70多载的历史长河中,演绎过无数次的经典对决,而总决赛的PK更是荡气回肠、精彩绝伦。作为缔造者,这些伟大的球队更是承载着一代球迷的回忆,如果想要选出最强的球队,无疑是鸡蛋里挑骨头,几乎是一项不可能完成的任务。然而我们经常会在比如虎扑论坛看到关于最强冠军队伍的讨论,这说明JRs对这个话题的执着热情。虽然这是一件仁者见仁智者见智的事情,亦或者部分狂热球迷会带着爱屋及乌的那份支持与期待。
实则一场球赛的成败关乎太多因素,有许多LIVE偶然无法预测,作为一个狂热的球迷,结合多年的看比赛及实战经验,同时结合历史上多场经典赛事,今天结合真实数据来揭秘一场球赛成功背后哪些必不可缺少的因素。
接下来且听小编一本正经的胡说八道!!
最强冠军球队候选人
- 时间:公牛王朝元年(90~91赛季)— 1516赛季,因为公牛王朝是绝大多数球迷最初的NBA记忆,而数据方面只记录到1516赛季,所以只能忽略今年这只勇士队了。
- 连续两年或者三年内两次打入总决赛的冠军队伍,出于考虑到队伍持久、稳定的竞争力。
候选人登场
赛季 | 冠军球队 | 对手球队 | 对阵比方 | 高光概略 |
---|---|---|---|---|
1991~1992 | 公牛 | 开拓者 | 4:2 | 常规赛:67—15,总决赛面对开拓者,轻松写意地4:2结束战斗,在总决赛上,乔丹不断命中三分,耸肩作轻松样成为经典 |
1994~1995 | 火箭 | 魔术 | 4:0 | 赛季中期加入滑翔机—德雷克斯勒,联手大梦,在总决赛兵不血刃地以4:0横扫,新秀即以巅峰状态示人的大鲨鱼—奥尼尔和便士哈达威领衔的魔术队 |
1995~1996 | 公牛 | 超音速 | 4:2 | 常规赛:72-10的神迹,一直保持到了15~16赛季,公牛王朝最强的一年,没毛病 |
2000~2001 | 湖人 | 76人 | 4:1 | 巅峰期的OK组合,打起球来让对手想骂人,季后赛15:1,只因AI逆天的手感才被打破不败金身 |
2002~2003 | 马刺 | 篮网 | 4:2 | 巅峰期的邓肯搭档老当益壮的名人堂成员大卫.罗宾逊组成内线双塔,更有帕克,吉诺比利,GDP组合也已然有了雏形,板凳上还有史蒂夫·科尔 |
2007~2008 | 凯尔特人 | 湖人 | 4:4 | 加内特、雷阿伦、皮尔斯组成的绿军三巨头,后卫线又有朗多,在总决赛上,以4:2击败科比领衔的湖人队 |
2009~2010 | 湖人 | 凯尔特人 | 4:3 | 科比搭档家嫂连续三年进入总决赛,与绿军大战七场,实现总决赛比分上的逆转,也成功的复仇了绿军 |
2012~2013 | 热火 | 马刺 | 4:3 | 热火与马刺纠缠了7场才分胜负,其中第六场雷阿伦终场前迎着帕克投入的关键三分镜头已为经典 |
2014~2015 | 勇士 | 骑士 | 4:1 | 这是一只跨时代的球队,打破依据离篮筐越近,命中率越高为基本原则的“铁律”,将炮轰上升到另一个层次,而且它还在进化,着实让人可怕 |
2015~2016 | 骑士 | 勇士 | 4:3 | 在库里腿伤未完全恢复和博古特意外报销的情况,骑士队抓住了机会,实现逆转,随着第七场,欧文一对一单挑库里投入致胜三分,仍是将总冠军抢到手 |
附录.NBA各球队缩写简称与正式名称对照表
球队简称 | 正式名称 |
---|---|
CHI | 芝加哥公牛 |
HOU | 休斯顿火箭 |
SAS | 圣安东尼奥马刺 |
GSW | 金州勇士 |
LAL | 洛杉矶湖人 |
BOS | 波士顿凯尔特人 |
MIA | 迈阿密热火 |
CLE | 克里弗兰骑士 |
数据预处理
待处理数据
- team_season.csv
- team_playoff.csv
数据处理过程
- 数据时间太过散乱,不方便进行分类处理,故需要针对时间区间添加“赛季”列
- 选出上面十个总冠军队伍常规赛、季后赛,球队与对手的各项数据均值
- 计算冠军队伍的高阶数据:进攻效率值和防守效率值,并实现数据可视化
#加载R语言包
library(dplyr)
library(stringr)
library(ggplot2)
champion_name <- c("CHI","HOU","CHI","LAL","SAS","BOS","LAL","MIA","GSW","CLE")
Season_list <- c("91-92","94-95","95-96","00-21","02-03","07-08","09-10","12-13","14-15","15-16")
champions <- data.frame(champion_name,Season_list,stringsAsFactors=F)
#赛季数据简单处理
simple_db <- function(team_season){
team_season$对手<-str_sub(team_season$比分,start = 1,end = 3)
team_season$时间 <- as.Date(team_season$时间,"%Y-%m-%d")
team_season$赛季[team_season$时间 > as.Date("1985-9-11") & team_season$时间 < as.Date("1986-8-11")] <-"85-86"
team_season$赛季[team_season$时间 > as.Date("1986-9-11") & team_season$时间 < as.Date("1987-8-11")] <-"86-87"
team_season$赛季[team_season$时间 > as.Date("1987-9-11") & team_season$时间 < as.Date("1988-8-11")] <-"87-88"
team_season$赛季[team_season$时间 > as.Date("1988-9-11") & team_season$时间 < as.Date("1989-8-11")] <-"88-89"
team_season$赛季[team_season$时间 > as.Date("1989-9-11") & team_season$时间 < as.Date("1990-8-11")] <-"89-90"
team_season$赛季[team_season$时间 > as.Date("1990-9-11") & team_season$时间 < as.Date("1991-8-11")] <-"90-91"
team_season$赛季[team_season$时间 > as.Date("1991-9-11") & team_season$时间 < as.Date("1992-8-11")] <-"91-92"
team_season$赛季[team_season$时间 > as.Date("1992-9-11") & team_season$时间 < as.Date("1993-8-11")] <-"92-93"
team_season$赛季[team_season$时间 > as.Date("1993-9-11") & team_season$时间 < as.Date("1994-8-11")] <-"93-94"
team_season$赛季[team_season$时间 > as.Date("1994-9-11") & team_season$时间 < as.Date("1995-8-11")] <-"94-95"
team_season$赛季[team_season$时间 > as.Date("1995-9-11") & team_season$时间 < as.Date("1996-8-11")] <-"95-96"
team_season$赛季[team_season$时间 > as.Date("1996-9-11") & team_season$时间 < as.Date("1997-8-11")] <-"96-97"
team_season$赛季[team_season$时间 > as.Date("1997-9-11") & team_season$时间 < as.Date("1998-8-11")] <-"97-98"
team_season$赛季[team_season$时间 > as.Date("1998-9-11") & team_season$时间 < as.Date("1999-8-11")] <-"98-99"
team_season$赛季[team_season$时间 > as.Date("1999-9-11") & team_season$时间 < as.Date("2000-8-11")] <-"99-00"
team_season$赛季[team_season$时间 > as.Date("2000-9-11") & team_season$时间 < as.Date("2001-8-11")] <-"00-01"
team_season$赛季[team_season$时间 > as.Date("2001-9-11") & team_season$时间 < as.Date("2002-8-11")] <-"01-02"
team_season$赛季[team_season$时间 > as.Date("2002-9-11") & team_season$时间 < as.Date("2003-8-11")] <-"02-03"
team_season$赛季[team_season$时间 > as.Date("2003-9-11") & team_season$时间 < as.Date("2004-8-11")] <-"03-04"
team_season$赛季[team_season$时间 > as.Date("2004-9-11") & team_season$时间 < as.Date("2005-8-11")] <-"04-05"
team_season$赛季[team_season$时间 > as.Date("2005-9-11") & team_season$时间 < as.Date("2006-8-11")] <-"05-06"
team_season$赛季[team_season$时间 > as.Date("2006-9-11") & team_season$时间 < as.Date("2007-8-11")] <-"06-07"
team_season$赛季[team_season$时间 > as.Date("2007-9-11") & team_season$时间 < as.Date("2008-8-11")] <-"07-08"
team_season$赛季[team_season$时间 > as.Date("2008-9-11") & team_season$时间 < as.Date("2009-8-11")] <-"08-09"
team_season$赛季[team_season$时间 > as.Date("2009-9-11") & team_season$时间 < as.Date("2010-8-11")] <-"09-10"
team_season$赛季[team_season$时间 > as.Date("2010-9-11") & team_season$时间 < as.Date("2011-8-11")] <-"10-11"
team_season$赛季[team_season$时间 > as.Date("2011-9-11") & team_season$时间 < as.Date("2012-8-11")] <-"11-12"
team_season$赛季[team_season$时间 > as.Date("2012-9-11") & team_season$时间 < as.Date("2013-8-11")] <-"12-13"
team_season$赛季[team_season$时间 > as.Date("2013-9-11") & team_season$时间 < as.Date("2014-8-11")] <-"13-14"
team_season$赛季[team_season$时间 > as.Date("2014-9-11") & team_season$时间 < as.Date("2015-8-11")] <-"14-15"
team_season$赛季[team_season$时间 > as.Date("2015-9-11") & team_season$时间 < as.Date("2016-8-11")] <-"15-16"
return(team_season)
}
#球队赛季数据处理
season_general <- function(season_db, season, team){
team_season_db <-filter(season_db, 赛季==season, 球队==team)
team_season_General <-team_season_db %>%
group_by(球队) %>%
summarise(
场次 = n(),
赛季=season,
胜场=length(which(结果== "W")),
负场=length(which(结果== "L")),
投篮=mean(投篮,na.rm = TRUE),
命中=mean(命中,na.rm = TRUE),
出手=mean(出手,na.rm = TRUE),
三分=mean(三分,na.rm = TRUE),
三分命中=mean(三分命中,na.rm = TRUE),
三分出手=mean(三分出手,na.rm = TRUE),
罚球=mean(罚球,na.rm = TRUE),
罚球命中=mean(罚球命中,na.rm = TRUE),
罚球出手=mean(罚球出手,na.rm = TRUE),
篮板=mean(篮板,na.rm = TRUE),
前场=mean(前场,na.rm = TRUE),
后场=mean(后场,na.rm = TRUE),
助攻=mean(助攻,na.rm = TRUE),
抢断=mean(抢断,na.rm = TRUE),
盖帽=mean(盖帽,na.rm = TRUE),
失误=mean(失误,na.rm = TRUE),
犯规=mean(犯规,na.rm = TRUE),
得分=mean(得分,na.rm = TRUE)
)
return(team_season_General)
}
#对手赛季数据处理
Opp_season_general <- function(season_db, season, team){
Opp_team_season_db <-filter(season_db, 赛季==season, 对手==team)
Opp_team_season_General <- Opp_team_season_db %>%
group_by(对手) %>%
summarise(
Opp_场次 = n(),
Opp_投篮=mean(投篮,na.rm = TRUE),
Opp_命中=mean(命中,na.rm = TRUE),
Opp_出手=mean(出手,na.rm = TRUE),
Opp_三分=mean(三分,na.rm = TRUE),
Opp_三分命中=mean(三分命中,na.rm = TRUE),
Opp_三分出手=mean(三分出手,na.rm = TRUE),
Opp_罚球=mean(罚球,na.rm = TRUE),
Opp_罚球命中=mean(罚球命中,na.rm = TRUE),
Opp_罚球出手=mean(罚球出手,na.rm = TRUE),
Opp_篮板=mean(篮板,na.rm = TRUE),
Opp_前场=mean(前场,na.rm = TRUE),
Opp_后场=mean(后场,na.rm = TRUE),
Opp_助攻=mean(助攻,na.rm = TRUE),
Opp_抢断=mean(抢断,na.rm = TRUE),
Opp_盖帽=mean(盖帽,na.rm = TRUE),
Opp_失误=mean(失误,na.rm = TRUE),
Opp_犯规=mean(犯规,na.rm = TRUE),
Opp_得分=mean(得分,na.rm = TRUE)
)
return(Opp_team_season_General)
}
champion_db <-function(team_season){
# 91-92赛季 公牛队
CHI_91_92_General <- season_general(team_season,"91-92","CHI")
Opp_CHI_91_92_General<- Opp_season_general(team_season, "91-92","CHI")
CHI_91_92_Tot <- cbind(CHI_91_92_General,Opp_CHI_91_92_General[,-1])
# 94-95赛季 火箭队
HOU_94_95_General <- season_general(team_season,"94-95","HOU")
Opp_HOU_94_95_General<- Opp_season_general(team_season, "94-95","HOU")
HOU_94_95_Tot <- cbind(HOU_94_95_General,Opp_HOU_94_95_General[,-1])
# 95-96赛季 公牛队
CHI_95_96_General <- season_general(team_season,"95-96","CHI")
Opp_CHI_95_96_General<- Opp_season_general(team_season, "95-96","CHI")
CHI_95_96_Tot <- cbind(CHI_95_96_General,Opp_CHI_95_96_General[,-1])
# 00-01赛季 湖人队
LAL_00_01_General <- season_general(team_season,"00-01","LAL")
Opp_LAL_00_01_General<- Opp_season_general(team_season, "00-01","LAL")
LAL_00_01_Tot <- cbind(LAL_00_01_General,Opp_LAL_00_01_General[,-1])
# 02-03赛季 马刺队
SAS_02_03_General <- season_general(team_season,"02-03","SAS")
Opp_SAS_02_03_General<- Opp_season_general(team_season, "02-03","SAS")
SAS_02_03_Tot <- cbind(SAS_02_03_General,Opp_SAS_02_03_General[,-1])
# 07-08赛季 凯尔特人队
BOS_07_08_General <- season_general(team_season,"07-08","BOS")
Opp_BOS_07_08_General<- Opp_season_general(team_season, "07-08","BOS")
BOS_07_08_Tot <- cbind(BOS_07_08_General,Opp_BOS_07_08_General[,-1])
# 09-10赛季 湖人队
LAL_09_10_General <- season_general(team_season,"09-10","LAL")
Opp_LAL_09_10_General<- Opp_season_general(team_season, "09-10","LAL")
LAL_09_10_Tot <- cbind(LAL_09_10_General,Opp_LAL_09_10_General[,-1])
# 12-13赛季 热火队
MIA_09_10_General <- season_general(team_season,"12-13","MIA")
Opp_MIA_09_10_General<- Opp_season_general(team_season, "12-13","MIA")
MIA_09_10_Tot <- cbind(MIA_09_10_General,Opp_MIA_09_10_General[,-1])
# 14-15赛季 勇士队
GSW_14_15_General <- season_general(team_season,"14-15","GSW")
Opp_GSW_14_15_General<- Opp_season_general(team_season, "14-15","GSW")
GSW_14_15_Tot <- cbind(GSW_14_15_General,Opp_GSW_14_15_General[,-1])
# 15-16赛季 骑士队
CLE_15_16_General <- season_general(team_season,"15-16","CLE")
Opp_CLE_15_16_General<- Opp_season_general(team_season, "15-16","CLE")
CLE_15_16_Tot <- cbind(CLE_15_16_General,Opp_CLE_15_16_General[,-1])
champion_total <- rbind(CHI_91_92_Tot,HOU_94_95_Tot,CHI_95_96_Tot,LAL_00_01_Tot,SAS_02_03_Tot,
BOS_07_08_Tot,LAL_09_10_Tot,MIA_09_10_Tot,GSW_14_15_Tot,CLE_15_16_Tot)
champion_total$胜负分 <- champion_total$得分- champion_total$Opp_得分
return(champion_total)
}
#高阶数据计算
#公式:Points x (100/(Field Goals Attempted - Off Rebounds + Turnovers + (Free Throws Attempted * 0.44))
Advanced_db<-function(team_season){
Advanced_team_season <- team_season %>%
mutate(
球队,
DRtg=得分*(100/(出手-前场+失误+罚球出手*0.44)),
ORtg=Opp_得分*(100/(Opp_出手-Opp_前场+Opp_失误+Opp_罚球出手*0.44))
) %>%
select(球队, 赛季, DRtg, ORtg,胜负分)
return(Advanced_team_season)
}
NBA_data <-list.files("../input/NBAdata")
NBA_data
'advanced_basic.csv' 'advanced_shooting.csv' 'avg.csv' 'coach_playoff.csv' 'coach_season.csv' 'player_playoff.csv' 'player_salary.csv' 'player_season.csv' 'single.csv' 'team_playoff.csv' 'team_season.csv' 'tot.csv'
#导入常规赛球队数据
team_season <- read.csv("../input/NBAdata/team_season.csv", sep = ",", header = T, stringsAsFactors = F)
#常规赛球队预处理
team_season <-simple_db(team_season)
#常规赛冠军候选数据罗列
Regular_season<-champion_db(team_season)
Regular_season
#导入季后赛球队数据
team_playoff_season <- read.csv("../input/NBAdata/team_playoff.csv", sep = ",", header = T, stringsAsFactors = F)
#季后赛赛球队预处理
team_playoff_season <-simple_db(team_playoff_season)
#季后赛冠军候选数据罗列
playoff_season<-champion_db(team_playoff_season)
playoff_season
#常规赛高阶数据计算
Advanced_Regular_season <- Advanced_db(Regular_season)
Advanced_Regular_season$标注 <- paste(Advanced_Regular_season$球队,Advanced_Regular_season$赛季,sep = "-")
Advanced_Regular_season
#常规赛高阶数据可视化,圆圈代表球队,圆圈大小与胜负分成正比例关系 ,如图所示
ggplot(Advanced_Regular_season,aes(ORtg,DRtg))+geom_point(aes(color=赛季,size=胜负分))+geom_text(aes(y=DRtg +.5, label=标注), size=3)+labs(x="防守效率值", y="进攻效率值",title="常规赛攻防力")
#季后赛高阶数据计算
Advanced_playoff_season <- Advanced_db(playoff_season)
Advanced_playoff_season $标注 <- paste(Advanced_playoff_season $球队,Advanced_playoff_season $赛季,sep = "-")
Advanced_playoff_season
#季后赛高阶数据可视化,圆圈代表球队,圆圈大小与胜负分成正比例关系
ggplot(Advanced_playoff_season,aes(ORtg,DRtg))+geom_point(aes(color=赛季,size=胜负分))+geom_text(aes(y=DRtg +.5, label=标注), size=3)+labs(x="防守效率值", y="进攻效率值",title="季后赛攻防力")
}
常规赛表现回顾
- 胜负分上双总共有三支队伍:
球队 | 赛季 | 胜负分 |
---|---|---|
公牛 | 91~92 | 10.360832 |
公牛 | 95~96 | 12.376957 |
勇士 | 14~15 | 10.097561 |
- 常规赛战力最差的三支队伍:
球队 | 赛季 | 胜负分 |
---|---|---|
火箭 | 94~95 | 1.187669 |
湖人 | 00~01 | 3.579094 |
湖人 | 09~10 | 4.432622 |
总结
乔帮主带队伍是扛扛的,火箭夺冠之路走得确实辛苦,真是一场一场拼出来的,湖人由于伤病再加上自己得意又爱浪的特点,时不时出现注意力不集中,放松的毛病
季后赛表现回顾
- 胜负分上双总共有二支队伍:
球队 | 赛季 | 胜负分 |
---|---|---|
公牛 | 95~96 | 11.722222 |
湖人 | 00~01 | 12.750000 |
- 季后赛战力最差的三支队伍:
球队 | 赛季 | 胜负分 |
---|---|---|
火箭 | 94~95 | 2.772727 |
马刺 | 02~03 | 3.069444 |
湖人 | 09~10 | 3.826087 |
总结
00-01赛季的湖人常规赛装死,季后赛才露出自己的獠牙,各队被打服,心痛AI一分钟,95-96赛季的公牛队堪称完美,常规赛与季后赛一样大杀四方,乔帮主表示无压力,任凭“手套”垃圾话和全场领防。火箭季后赛有小幅上升,但还是坐稳末把交椅。马刺波波和石佛在西部被湖人压了这么些年,从这战力,也能看出部分原因。
结论
自己吹的牛*,含着泪也要那啥,回到正题,对比十支队伍的常规赛和季后赛表现,从数据层面上看,真给95~96赛季的公牛跪了,就像乔帮主自己说的:
说到这里,小编倒挺好奇16~17赛季的勇士队能否跟它一较高下呢!?
一本正经的胡说八道完了,你不点个赞吗!!!