SlideShare a Scribd company logo
1 of 18
Download to read offline
PERFORMANCE ANALYSIS NFL 2014
PERFORMANCE ANALYSIS NFL 2014
California State University, Los Angeles
Roshik Ganesan
Lakshmi Sundararajan
PERFORMANCE ANALYSIS NFL 2014
DATA SET URL
NFL 2014
http://www.scan-support.com/help/sample-data-sets
This dataset NFL 2014 comprises the details of each that had participated in NFL season 2014.
Comprising 89 columns and 533 rows this dataset consists details about every match that was
played in the season. The field include the details about the team names, the venue capacity, the
type of turf that is used for the match, along with this data it has lots of information which
allows us to do a an entire performance analysis. It details us on the winner of each match the
passing attempts made and the corresponding successful passing that they have made. It also tells
us the number of intercepts made by the team in each week and how successfully they have
managed to convert it for their team. This data details us more on the methods in which the
teams have achieved their points with this the preffered method in achieving points could be
found. It also contains data on the points that the teams have scored every week based on which
the teams performance over the week is analysed. This data provides us a lot of insight to be
analyzed which helps in doing a details performance analysis.
DATA CLEANING
1) Removal of NA values
Script
> nfl <- read.csv('sports.csv',sep='|')
> View(nfl)
> nfl<-na.omit(nfl)
> View (nfl)
PERFORMANCE ANALYSIS NFL 2014
2) No columns to split
PERFORMANCE ANALYSIS NFL 2014
3) Deleting Columns
SCRIPT
>nfl$Redzone.TD<-NULL
> nfl$Redzone.Visits<-NULL
> nfl$Redzone.Efficiency<-NULL
PERFORMANCE ANALYSIS NFL 2014
ANALYSIS AND VISUALIZATION
Question 1: Win and Loss Comparison
In this visualization, we have compared each team’s wins and losses of the season. We
can categorize the visualization based on Best, Average and Poor performers.Looking onto the
bar chart that we have depicted below it is clear that IND( Indiana )has the highest wins of 14
matches and lost only 5 ,falling under the category of best performer .The average performers of
the season based on this comparison are CAR(California), CLE and MIN(Minnepolis) where
both win and loss are equal to 8 matches.Also, it is seen that the teams TB (Tampa Bay) and
NYJ(New Jersey) has the least number of wins which is only 2 and 4 respectively. Hence these
two teams fall under Poor performers.
PERFORMANCE ANALYSIS NFL 2014
Parameters Learnt In Class:
We have installed two packages Dplyr, Data.table. Using plot_ly we have done side by side
bar. Colors' function is used.
Question 2: What are the Top 5 best intercepting teams ?
In this visualization, we have considered the top 5 interceptions. The term interceptions mean
tackling the opponents passes and gaining possession with the ball. As per the pie chart shown
below, we can see that the team PHI(Philandalphia) has made the greatest interceptions of 21.
Interesting point to note here is that the team TB(Tampa Bay) has the second highest interception
percentage of 17.2 ,but has poor performance in the overall season.This indicates that TB though
strong in interception couldn’t perform well because of the weak offense team. This states that
interception is not an important parameter in achieving success in a season.
Parameters Learnt In Class:
Using plot_ly we have made a pie chart. Colors' function is used.
PERFORMANCE ANALYSIS NFL 2014
Question 3: Which team has the best successful passing coversion ?
In this visualization, we have done an analysis on the successful passing conversion percentage
of the season.This is done by considering the total passing attempts out of which successful
passing completion is done. These values are passed into the function which gives the result of
success conversion percentage that is ordered in descending. It can be seen that the team
NO(New Orleans) has the highest passing conversion percentage. Even though the passing
percentage is high their overall performance is not significant. Whereas Dallas has a passing
percentage of 68.8% which bolsters their consistent performance in the season. The top 5 teams
in the list except for Dallas are average performers in the season which states that the passing
conversion parameter doesn’t have a big impact on the overall performance but still maintaining
a good percentage with a decent offence would stand good chances of outperforming the
opponents in the season.
PERFORMANCE ANALYSIS NFL 2014
Parameters Learnt In Class:
Color function, Standard Deviation and Plot_ly for bar chart is used. Then the legend
function is also used for displaying legends.
Question 4: Weekly Analysis of the performance of the teams
In this visualization, we do an analysis on the weekly performance of the teams. This analysis
provides the user with the privilege to enter the team name at runtime and view only that
particular team’s performance metrics. We have used a median function to represent the median
score of the preffered team. We found that the performance of the team ARI (User Preffered) in
the first half of the season is above the median scale whereas second half of the season is below
the median scale. With this analysis the overall performance of the team can be improved by
identifying the period where the team is outperformed, the underlying reason behind it and the
means to achieve better performance during this period.
Getting input from User Sample.
Result Of Input
PERFORMANCE ANALYSIS NFL 2014
Parameters Learnt In Class:
Median function and Plot_ly for Line Chart.
PERFORMANCE ANALYSIS NFL 2014
Question 5: Finding the statistics behind achieving first down by the teams
In this visualization, we have analyzed the statistics behind achieving first down by the teams.
The parameters taken into account are passing,rushing and penalty. Based on maximum total
first down count it is being ordered and plotted in 3D scatter plot.Indiana which is the top team
in the season have achieved the maximum first down by rushing and passing having least
penalties. We can also note that the team NE (New England Patriots) has even numbers of
rushing passing and penalty. Where as BAL has achieved maximum first downs still they
weren’t successful in the season because they have achieved maximum first downs by penalties.
So from this when compared to penalties the other two parameters such as rushing and passing
should the best channel to achieve the first down. This would help the teams in achieving a
competitive position in the season.
PERFORMANCE ANALYSIS NFL 2014
R CODE
Question 1 Script:
install.packages('dplyr')
library(dplyr)
install.packages('data.table')
library(data.table)data <- read.csv('NFL.csv')
df1 <- data %>% dplyr::group_by(Team,X) %>% summarise ( count = n());
df1 <- data.frame(df1);
teamlist <- list(split(df1,df1$X));
loss_df <- data.frame(sapply(teamlist,'[','L'));
win_df <- data.frame(sapply(teamlist,'[','W'));
PERFORMANCE ANALYSIS NFL 2014
merge_df <- merge(x = loss_df ,y = win_df, by.x = "L.Team",by.y = "W.Team",all = TRUE );
merge_df <- data.frame(merge_df);
rowname <- merge_df$L.Team
plot_df <- data.frame(merge_df$L.count,merge_df$W.count,merge_df$L.Team);
print(plot_df);
Teamname <- merge_df$L.Team;
p <- plot_ly(plot_df,x = ~Teamname, y = ~merge_df.L.count, type = 'bar', name = 'Lost') %>%
add_trace(y = ~merge_df.W.count, name = 'Wins') %>% layout(xaxis = list(title = '', tickangle =
-45), yaxis = list(title = 'Win/Loss'), barmode = 'group', title = 'Win and Loss Comparison')
print(p)
question1.R
Question 2 Scrpit:
data <- read.csv('NFL.csv')
df_1 <- data.frame(data);
df3<-group_by(df_1,Team) %>% summarise(total = sum(Interceptions));
total <- df3$total;
piechart <- df3[order(-total),];
df4 <- head(piechart);
PERFORMANCE ANALYSIS NFL 2014
total <- df4$total;
totals <- c('PHI','IND','TB','CHI','JAC','MIN')
pie_df <- data.frame(totals,total)
rownames(pie_df) <- pie_df$totals
piechart1 <- pie_df[,c('total','totals')]
p <- plot_ly(data, labels = ~totals, values = ~total, type = 'pie',
textposition = 'inside',
textinfo = 'label+percent',
insidetextfont = list(color = '#FFFFFF'),
hoverinfo = 'text',
text = ~paste('No of Intercepts =', total),
marker = list(colors = colors,
line = list(color = '#FFFFFF', width = 1)),
showlegend = FALSE) %>%
layout(title = 'Top 5 Best Intercepting Team',
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
print(p)
PERFORMANCE ANALYSIS NFL 2014
question2.R
Question 3 Script: (Standard Deviation)
data <- read.csv('NFL.csv')
df_1 <- data.frame(data);
passing<-group_by(df_1,Team) %>% summarise(total_passing = sum(Passing.Plays));
total_passing <- passing$total_passing;
teams <- passing$Team;
passing_success <- group_by(df_1,Team) %>% summarise(success_pass =
sum(Passing.Completions));
success_pass <- passing_success$success_pass;
sd_passing <- sd(success_pass)
print('The standard deviation of the Success Passing for the Season is')
print(sd_passing )
source('passing_function.R');
success <- passing_function(success_pass,total_passing);
linedf <- data.frame(teams, success);
PERFORMANCE ANALYSIS NFL 2014
ordered <- linedf[order(-success),];
top5 <- head(ordered);
newdf <- data.frame(top5);
nme <- newdf$teams;
lab <- newdf$success;
barplot(newdf$success,main = "Top 6 Passing Conversion Percentage",names = nme, col =
c("red","blue","green","yellow","gray","purple"),ylim = c(65,70), xlab = "Teams",ylab =
"Passing Percentage", xpd = FALSE);
legend("topright", legend = c("No - 69.12", "DAL - 68.82","PIT - 67.27", "WAS - 66.54","MIA
- 66.21", "SD - 66.20"), fill = c("red","blue","green","yellow","gray","purple"))
Function used – passing_function()
passing_function <- function(x,y)
{
success_pass <- x;
total_passing <- y;
success_percentage <- ((success_pass/total_passing)*100);
return(success_percentage);
}
PERFORMANCE ANALYSIS NFL 2014
question3.R
passing_function.R
Question 4 Script: ( Median)
team_vect <- data %>% group_by(Team,Week) %>% summarise(points_sum =
sum(Points.Scored));
team_df <- data.frame(team_vect);
teamlist <- list(split(team_df,team_df$Team));
print("Enter team Name");
teamnme <- scan("",what = "char");
team_df1 <- data.frame(sapply(teamlist, '[',teamnme));
print(team_df1);
print("Enter column to be plotted in line");
var <- scan("",what = "char");
forplot <- team_df1[,var];
PERFORMANCE ANALYSIS NFL 2014
Weeks <- c(1:16)
t <- list(family = "sans serif",size = 14,color = toRGB("grey50"))
plot_df <- data.frame(Weeks,forplot)
print('The median score of the Team is')
print(median(plot_df$forplot));
p <- plot_ly(plot_df, x = ~Weeks, y = ~forplot, type = 'scatter', mode = 'lines', text = ~forplot)
%>% layout(title = "Weekly Analysis", showlegend = FALSE) %>% add_markers() %>%
add_text(textfont = t, textposition = "top right")
print(p)
question4.R
Question 5 Script:
install.packages("scatterplot3d")
library(scatterplot3d)
df_1 <- data.frame(data);
df7<-group_by(df_1,Team) %>% summarise(total_passing =
sum(Passing.First.Downs),total_rushing = sum(Rushing.First.Downs),total_penality =
sum(Penalty.First.Downs),total = sum(Total.First.Downs));
first_down_df <- data.frame(df7);
PERFORMANCE ANALYSIS NFL 2014
count <- table(df7$total_passing,df7$total_rushing);
name1 <- df7$Team;
total <- first_down_df$total;
ordered_value <- first_down_df[order(-total),];
top_ordered <- data.frame(head(ordered_value));
nme <- top_ordered$Team;
dfnme <- data.frame(nme);
print(dfnme);
sp3 <-
scatterplot3d(top_ordered$total_passing,top_ordered$total_rushing,top_ordered$total_penality,c
olor = "blue",type = 'h',pch = 19, main = "First Down Comparison",xlab = "Total Passing",ylab =
"Total Penalty",zlab = "Total Rushing")
sp3.coords <-
sp3$xyz.convert(top_ordered$total_passing,top_ordered$total_rushing,top_ordered$total_penalit
y)
text(sp3.coords$x,sp3.coords$y,labels = dfnme$nme ,cex = .85,pos = 4)
question5.R

More Related Content

Similar to Performance Analysis NFL 2014

Data warehouse Soccer Project
Data warehouse Soccer Project Data warehouse Soccer Project
Data warehouse Soccer Project Sagar Singh
 
m503 Project1 FINAL DRAFT
m503 Project1 FINAL DRAFTm503 Project1 FINAL DRAFT
m503 Project1 FINAL DRAFTBrian Becker
 
Determinants of College Football Attendance
Determinants of College Football AttendanceDeterminants of College Football Attendance
Determinants of College Football AttendanceConnor Weaver
 
CLanctot_DSlavin_JMiron_Stats415_Project
CLanctot_DSlavin_JMiron_Stats415_ProjectCLanctot_DSlavin_JMiron_Stats415_Project
CLanctot_DSlavin_JMiron_Stats415_ProjectDimitry Slavin
 
Coaching Ability for Fantasy Football from Numbersense by Kaiser Fung
Coaching Ability for Fantasy Football from Numbersense by Kaiser FungCoaching Ability for Fantasy Football from Numbersense by Kaiser Fung
Coaching Ability for Fantasy Football from Numbersense by Kaiser FungMcGraw-Hill Professional
 
A Time Series Analysis for Predicting Basketball Statistics
A Time Series Analysis for Predicting Basketball StatisticsA Time Series Analysis for Predicting Basketball Statistics
A Time Series Analysis for Predicting Basketball StatisticsJoseph DeLay
 
What Innings Determine Total Wins
What Innings Determine Total WinsWhat Innings Determine Total Wins
What Innings Determine Total WinsPayton Soicher
 
1. After watching the attached video by Dan Pink on .docx
1. After watching the attached video by Dan Pink on .docx1. After watching the attached video by Dan Pink on .docx
1. After watching the attached video by Dan Pink on .docxjeremylockett77
 
Cuiting Zhu-Poster
Cuiting Zhu-PosterCuiting Zhu-Poster
Cuiting Zhu-PosterCuiting Zhu
 
InstructionsCongratulations. You are a finalist in for a data a.docx
InstructionsCongratulations. You are a finalist in for a data a.docxInstructionsCongratulations. You are a finalist in for a data a.docx
InstructionsCongratulations. You are a finalist in for a data a.docxnormanibarber20063
 
Data presentation 2.pptx
Data presentation 2.pptxData presentation 2.pptx
Data presentation 2.pptxShayanHaider14
 
A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...
A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...
A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...Shannon Green
 
NFL 2022 STATS Report
NFL 2022 STATS ReportNFL 2022 STATS Report
NFL 2022 STATS Reportdavidwaynne
 
IPL auction q1_q2.docx
IPL auction q1_q2.docxIPL auction q1_q2.docx
IPL auction q1_q2.docxAlivaMishra4
 

Similar to Performance Analysis NFL 2014 (20)

Data warehouse Soccer Project
Data warehouse Soccer Project Data warehouse Soccer Project
Data warehouse Soccer Project
 
LAX IMPACT! White Paper
LAX IMPACT! White PaperLAX IMPACT! White Paper
LAX IMPACT! White Paper
 
m503 Project1 FINAL DRAFT
m503 Project1 FINAL DRAFTm503 Project1 FINAL DRAFT
m503 Project1 FINAL DRAFT
 
Determinants of College Football Attendance
Determinants of College Football AttendanceDeterminants of College Football Attendance
Determinants of College Football Attendance
 
CLanctot_DSlavin_JMiron_Stats415_Project
CLanctot_DSlavin_JMiron_Stats415_ProjectCLanctot_DSlavin_JMiron_Stats415_Project
CLanctot_DSlavin_JMiron_Stats415_Project
 
Coaching Ability for Fantasy Football from Numbersense by Kaiser Fung
Coaching Ability for Fantasy Football from Numbersense by Kaiser FungCoaching Ability for Fantasy Football from Numbersense by Kaiser Fung
Coaching Ability for Fantasy Football from Numbersense by Kaiser Fung
 
A Time Series Analysis for Predicting Basketball Statistics
A Time Series Analysis for Predicting Basketball StatisticsA Time Series Analysis for Predicting Basketball Statistics
A Time Series Analysis for Predicting Basketball Statistics
 
What Innings Determine Total Wins
What Innings Determine Total WinsWhat Innings Determine Total Wins
What Innings Determine Total Wins
 
Final Research Paper
Final Research PaperFinal Research Paper
Final Research Paper
 
Capstone
CapstoneCapstone
Capstone
 
1. After watching the attached video by Dan Pink on .docx
1. After watching the attached video by Dan Pink on .docx1. After watching the attached video by Dan Pink on .docx
1. After watching the attached video by Dan Pink on .docx
 
Cuiting Zhu-Poster
Cuiting Zhu-PosterCuiting Zhu-Poster
Cuiting Zhu-Poster
 
InstructionsCongratulations. You are a finalist in for a data a.docx
InstructionsCongratulations. You are a finalist in for a data a.docxInstructionsCongratulations. You are a finalist in for a data a.docx
InstructionsCongratulations. You are a finalist in for a data a.docx
 
Data presentation 2.pptx
Data presentation 2.pptxData presentation 2.pptx
Data presentation 2.pptx
 
A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...
A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...
A Hybrid Constraint Programming And Enumeration Approach For Solving NHL Play...
 
NFL 2022 STATS Report
NFL 2022 STATS ReportNFL 2022 STATS Report
NFL 2022 STATS Report
 
Unit 5
Unit 5 Unit 5
Unit 5
 
honors_paper
honors_paperhonors_paper
honors_paper
 
Lineup Efficiency
Lineup EfficiencyLineup Efficiency
Lineup Efficiency
 
IPL auction q1_q2.docx
IPL auction q1_q2.docxIPL auction q1_q2.docx
IPL auction q1_q2.docx
 

More from Roshik Ganesan

Crime Analysis at Chicago
Crime Analysis at ChicagoCrime Analysis at Chicago
Crime Analysis at ChicagoRoshik Ganesan
 
Real Time Twitter sentiment analysis
Real Time Twitter sentiment analysis Real Time Twitter sentiment analysis
Real Time Twitter sentiment analysis Roshik Ganesan
 
Youth Tobacco Survey Analysis
Youth Tobacco Survey AnalysisYouth Tobacco Survey Analysis
Youth Tobacco Survey AnalysisRoshik Ganesan
 
Kick Start Startup Guide
Kick Start Startup GuideKick Start Startup Guide
Kick Start Startup GuideRoshik Ganesan
 
Predictive analysis of Income
Predictive analysis of Income Predictive analysis of Income
Predictive analysis of Income Roshik Ganesan
 

More from Roshik Ganesan (6)

Crime Analysis at Chicago
Crime Analysis at ChicagoCrime Analysis at Chicago
Crime Analysis at Chicago
 
Real Time Twitter sentiment analysis
Real Time Twitter sentiment analysis Real Time Twitter sentiment analysis
Real Time Twitter sentiment analysis
 
Death Cause Analysis
Death Cause AnalysisDeath Cause Analysis
Death Cause Analysis
 
Youth Tobacco Survey Analysis
Youth Tobacco Survey AnalysisYouth Tobacco Survey Analysis
Youth Tobacco Survey Analysis
 
Kick Start Startup Guide
Kick Start Startup GuideKick Start Startup Guide
Kick Start Startup Guide
 
Predictive analysis of Income
Predictive analysis of Income Predictive analysis of Income
Predictive analysis of Income
 

Recently uploaded

毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxdolaknnilon
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max PrincetonTimothy Spann
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Boston Institute of Analytics
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectBoston Institute of Analytics
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...Amil Baba Dawood bangali
 
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGILLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGIThomas Poetter
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...
毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...
毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...ttt fff
 

Recently uploaded (20)

毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptx
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max Princeton
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis Project
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
 
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGILLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...
毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...
毕业文凭制作#回国入职#diploma#degree美国加州州立大学北岭分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#de...
 

Performance Analysis NFL 2014

  • 1. PERFORMANCE ANALYSIS NFL 2014 PERFORMANCE ANALYSIS NFL 2014 California State University, Los Angeles Roshik Ganesan Lakshmi Sundararajan
  • 2. PERFORMANCE ANALYSIS NFL 2014 DATA SET URL NFL 2014 http://www.scan-support.com/help/sample-data-sets This dataset NFL 2014 comprises the details of each that had participated in NFL season 2014. Comprising 89 columns and 533 rows this dataset consists details about every match that was played in the season. The field include the details about the team names, the venue capacity, the type of turf that is used for the match, along with this data it has lots of information which allows us to do a an entire performance analysis. It details us on the winner of each match the passing attempts made and the corresponding successful passing that they have made. It also tells us the number of intercepts made by the team in each week and how successfully they have managed to convert it for their team. This data details us more on the methods in which the teams have achieved their points with this the preffered method in achieving points could be found. It also contains data on the points that the teams have scored every week based on which the teams performance over the week is analysed. This data provides us a lot of insight to be analyzed which helps in doing a details performance analysis. DATA CLEANING 1) Removal of NA values Script > nfl <- read.csv('sports.csv',sep='|') > View(nfl) > nfl<-na.omit(nfl) > View (nfl)
  • 3. PERFORMANCE ANALYSIS NFL 2014 2) No columns to split
  • 4. PERFORMANCE ANALYSIS NFL 2014 3) Deleting Columns SCRIPT >nfl$Redzone.TD<-NULL > nfl$Redzone.Visits<-NULL > nfl$Redzone.Efficiency<-NULL
  • 5. PERFORMANCE ANALYSIS NFL 2014 ANALYSIS AND VISUALIZATION Question 1: Win and Loss Comparison In this visualization, we have compared each team’s wins and losses of the season. We can categorize the visualization based on Best, Average and Poor performers.Looking onto the bar chart that we have depicted below it is clear that IND( Indiana )has the highest wins of 14 matches and lost only 5 ,falling under the category of best performer .The average performers of the season based on this comparison are CAR(California), CLE and MIN(Minnepolis) where both win and loss are equal to 8 matches.Also, it is seen that the teams TB (Tampa Bay) and NYJ(New Jersey) has the least number of wins which is only 2 and 4 respectively. Hence these two teams fall under Poor performers.
  • 6. PERFORMANCE ANALYSIS NFL 2014 Parameters Learnt In Class: We have installed two packages Dplyr, Data.table. Using plot_ly we have done side by side bar. Colors' function is used. Question 2: What are the Top 5 best intercepting teams ? In this visualization, we have considered the top 5 interceptions. The term interceptions mean tackling the opponents passes and gaining possession with the ball. As per the pie chart shown below, we can see that the team PHI(Philandalphia) has made the greatest interceptions of 21. Interesting point to note here is that the team TB(Tampa Bay) has the second highest interception percentage of 17.2 ,but has poor performance in the overall season.This indicates that TB though strong in interception couldn’t perform well because of the weak offense team. This states that interception is not an important parameter in achieving success in a season. Parameters Learnt In Class: Using plot_ly we have made a pie chart. Colors' function is used.
  • 7. PERFORMANCE ANALYSIS NFL 2014 Question 3: Which team has the best successful passing coversion ? In this visualization, we have done an analysis on the successful passing conversion percentage of the season.This is done by considering the total passing attempts out of which successful passing completion is done. These values are passed into the function which gives the result of success conversion percentage that is ordered in descending. It can be seen that the team NO(New Orleans) has the highest passing conversion percentage. Even though the passing percentage is high their overall performance is not significant. Whereas Dallas has a passing percentage of 68.8% which bolsters their consistent performance in the season. The top 5 teams in the list except for Dallas are average performers in the season which states that the passing conversion parameter doesn’t have a big impact on the overall performance but still maintaining a good percentage with a decent offence would stand good chances of outperforming the opponents in the season.
  • 8. PERFORMANCE ANALYSIS NFL 2014 Parameters Learnt In Class: Color function, Standard Deviation and Plot_ly for bar chart is used. Then the legend function is also used for displaying legends. Question 4: Weekly Analysis of the performance of the teams In this visualization, we do an analysis on the weekly performance of the teams. This analysis provides the user with the privilege to enter the team name at runtime and view only that particular team’s performance metrics. We have used a median function to represent the median score of the preffered team. We found that the performance of the team ARI (User Preffered) in the first half of the season is above the median scale whereas second half of the season is below the median scale. With this analysis the overall performance of the team can be improved by identifying the period where the team is outperformed, the underlying reason behind it and the means to achieve better performance during this period. Getting input from User Sample. Result Of Input
  • 9. PERFORMANCE ANALYSIS NFL 2014 Parameters Learnt In Class: Median function and Plot_ly for Line Chart.
  • 10. PERFORMANCE ANALYSIS NFL 2014 Question 5: Finding the statistics behind achieving first down by the teams In this visualization, we have analyzed the statistics behind achieving first down by the teams. The parameters taken into account are passing,rushing and penalty. Based on maximum total first down count it is being ordered and plotted in 3D scatter plot.Indiana which is the top team in the season have achieved the maximum first down by rushing and passing having least penalties. We can also note that the team NE (New England Patriots) has even numbers of rushing passing and penalty. Where as BAL has achieved maximum first downs still they weren’t successful in the season because they have achieved maximum first downs by penalties. So from this when compared to penalties the other two parameters such as rushing and passing should the best channel to achieve the first down. This would help the teams in achieving a competitive position in the season.
  • 11. PERFORMANCE ANALYSIS NFL 2014 R CODE Question 1 Script: install.packages('dplyr') library(dplyr) install.packages('data.table') library(data.table)data <- read.csv('NFL.csv') df1 <- data %>% dplyr::group_by(Team,X) %>% summarise ( count = n()); df1 <- data.frame(df1); teamlist <- list(split(df1,df1$X)); loss_df <- data.frame(sapply(teamlist,'[','L')); win_df <- data.frame(sapply(teamlist,'[','W'));
  • 12. PERFORMANCE ANALYSIS NFL 2014 merge_df <- merge(x = loss_df ,y = win_df, by.x = "L.Team",by.y = "W.Team",all = TRUE ); merge_df <- data.frame(merge_df); rowname <- merge_df$L.Team plot_df <- data.frame(merge_df$L.count,merge_df$W.count,merge_df$L.Team); print(plot_df); Teamname <- merge_df$L.Team; p <- plot_ly(plot_df,x = ~Teamname, y = ~merge_df.L.count, type = 'bar', name = 'Lost') %>% add_trace(y = ~merge_df.W.count, name = 'Wins') %>% layout(xaxis = list(title = '', tickangle = -45), yaxis = list(title = 'Win/Loss'), barmode = 'group', title = 'Win and Loss Comparison') print(p) question1.R Question 2 Scrpit: data <- read.csv('NFL.csv') df_1 <- data.frame(data); df3<-group_by(df_1,Team) %>% summarise(total = sum(Interceptions)); total <- df3$total; piechart <- df3[order(-total),]; df4 <- head(piechart);
  • 13. PERFORMANCE ANALYSIS NFL 2014 total <- df4$total; totals <- c('PHI','IND','TB','CHI','JAC','MIN') pie_df <- data.frame(totals,total) rownames(pie_df) <- pie_df$totals piechart1 <- pie_df[,c('total','totals')] p <- plot_ly(data, labels = ~totals, values = ~total, type = 'pie', textposition = 'inside', textinfo = 'label+percent', insidetextfont = list(color = '#FFFFFF'), hoverinfo = 'text', text = ~paste('No of Intercepts =', total), marker = list(colors = colors, line = list(color = '#FFFFFF', width = 1)), showlegend = FALSE) %>% layout(title = 'Top 5 Best Intercepting Team', xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE), yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE)) print(p)
  • 14. PERFORMANCE ANALYSIS NFL 2014 question2.R Question 3 Script: (Standard Deviation) data <- read.csv('NFL.csv') df_1 <- data.frame(data); passing<-group_by(df_1,Team) %>% summarise(total_passing = sum(Passing.Plays)); total_passing <- passing$total_passing; teams <- passing$Team; passing_success <- group_by(df_1,Team) %>% summarise(success_pass = sum(Passing.Completions)); success_pass <- passing_success$success_pass; sd_passing <- sd(success_pass) print('The standard deviation of the Success Passing for the Season is') print(sd_passing ) source('passing_function.R'); success <- passing_function(success_pass,total_passing); linedf <- data.frame(teams, success);
  • 15. PERFORMANCE ANALYSIS NFL 2014 ordered <- linedf[order(-success),]; top5 <- head(ordered); newdf <- data.frame(top5); nme <- newdf$teams; lab <- newdf$success; barplot(newdf$success,main = "Top 6 Passing Conversion Percentage",names = nme, col = c("red","blue","green","yellow","gray","purple"),ylim = c(65,70), xlab = "Teams",ylab = "Passing Percentage", xpd = FALSE); legend("topright", legend = c("No - 69.12", "DAL - 68.82","PIT - 67.27", "WAS - 66.54","MIA - 66.21", "SD - 66.20"), fill = c("red","blue","green","yellow","gray","purple")) Function used – passing_function() passing_function <- function(x,y) { success_pass <- x; total_passing <- y; success_percentage <- ((success_pass/total_passing)*100); return(success_percentage); }
  • 16. PERFORMANCE ANALYSIS NFL 2014 question3.R passing_function.R Question 4 Script: ( Median) team_vect <- data %>% group_by(Team,Week) %>% summarise(points_sum = sum(Points.Scored)); team_df <- data.frame(team_vect); teamlist <- list(split(team_df,team_df$Team)); print("Enter team Name"); teamnme <- scan("",what = "char"); team_df1 <- data.frame(sapply(teamlist, '[',teamnme)); print(team_df1); print("Enter column to be plotted in line"); var <- scan("",what = "char"); forplot <- team_df1[,var];
  • 17. PERFORMANCE ANALYSIS NFL 2014 Weeks <- c(1:16) t <- list(family = "sans serif",size = 14,color = toRGB("grey50")) plot_df <- data.frame(Weeks,forplot) print('The median score of the Team is') print(median(plot_df$forplot)); p <- plot_ly(plot_df, x = ~Weeks, y = ~forplot, type = 'scatter', mode = 'lines', text = ~forplot) %>% layout(title = "Weekly Analysis", showlegend = FALSE) %>% add_markers() %>% add_text(textfont = t, textposition = "top right") print(p) question4.R Question 5 Script: install.packages("scatterplot3d") library(scatterplot3d) df_1 <- data.frame(data); df7<-group_by(df_1,Team) %>% summarise(total_passing = sum(Passing.First.Downs),total_rushing = sum(Rushing.First.Downs),total_penality = sum(Penalty.First.Downs),total = sum(Total.First.Downs)); first_down_df <- data.frame(df7);
  • 18. PERFORMANCE ANALYSIS NFL 2014 count <- table(df7$total_passing,df7$total_rushing); name1 <- df7$Team; total <- first_down_df$total; ordered_value <- first_down_df[order(-total),]; top_ordered <- data.frame(head(ordered_value)); nme <- top_ordered$Team; dfnme <- data.frame(nme); print(dfnme); sp3 <- scatterplot3d(top_ordered$total_passing,top_ordered$total_rushing,top_ordered$total_penality,c olor = "blue",type = 'h',pch = 19, main = "First Down Comparison",xlab = "Total Passing",ylab = "Total Penalty",zlab = "Total Rushing") sp3.coords <- sp3$xyz.convert(top_ordered$total_passing,top_ordered$total_rushing,top_ordered$total_penalit y) text(sp3.coords$x,sp3.coords$y,labels = dfnme$nme ,cex = .85,pos = 4) question5.R