I will be looking at passing data from the 2021 NFL season and pulling the data straight from the NFL’s website. What I am looking at is how well teams pass and if this is correlated with having a good team or not. The way I will be doing this is by looking at all the passing stats that are given on the NFL’s site. The reason I chose the 2021 season is because this is the first season fans got to come back in full capacity after the pandemic. This could cause some weird things to happen and I just want to see if anything weird appears in the passing statistics. The statistics I will be looking at are passing attempts(att), completions (CMP), completion percentage(CMP%), yards per attempt(YDS/ATT), pass yards, passings touchdowns(TD), interceptions(INT), quaterback rating(Rate), first downs(1st), first down percentage(1st%), number of 20 yard passes(20+), number of 40 yard passes(40+), longest pass(Lng), sacks(SCK), and yards lost on sack(SCKY). My goal is to figure out how important passing is and figure out what leads to a good passing offense and what are important stats when having a good passing offense and a successful season.
Loading Packages
library(tidyverse) # The tidyverse collection of packages
Warning: package 'forcats' was built under R version 4.3.2
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.2 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.0
✔ ggplot2 3.4.3 ✔ tibble 3.2.1
✔ lubridate 1.9.2 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(httr) # Useful for web authenticationlibrary(rvest) # Useful tools for working with HTML and XML
Warning: package 'rvest' was built under R version 4.3.2
Attaching package: 'rvest'
The following object is masked from 'package:readr':
guess_encoding
library(lubridate) # Working with dateslibrary(magrittr) # Piping output easily with loops
Warning: package 'magrittr' was built under R version 4.3.2
Attaching package: 'magrittr'
The following object is masked from 'package:purrr':
set_names
The following object is masked from 'package:tidyr':
extract
library(xml2)
Warning: package 'xml2' was built under R version 4.3.2
Rows: 32 Columns: 16
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): NULL.Team, NULL.Lng
dbl (14): NULL.Att, NULL.Cmp, NULL.Cmp.., NULL.Yds.Att, NULL.Pass.Yds, NULL....
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 20 Columns: 17
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): NULL.Team, NULL.Lng, SackCategory
dbl (14): NULL.Att, NULL.Cmp, NULL.Cmp.., NULL.Yds.Att, NULL.Pass.Yds, NULL....
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
sack_data %>%ggplot(aes(reorder(NULL.Team, NULL.Sck), NULL.Pass.Yds, fill = SackCategory)) +geom_bar(stat ="identity") +labs(x ="Team", y ="Passing Yards") +facet_wrap(~ SackCategory, scales ="free", nrow =1) +scale_fill_manual(values =c("darkgreen", "red"), guide =FALSE) +theme(axis.text.x =element_text(angle =45, hjust =1)) +ggtitle("Comparison of Passing Yards Between Most and Least Sacked Teams in 2021")
Warning: The `guide` argument in `scale_*()` cannot be `FALSE`. This was deprecated in
ggplot2 3.3.4.
ℹ Please use "none" instead.
For this data I am looking at the teams that got sacked least vs the teams that got sacked the most and can make conclusions about how the season went based off seeing this. Teams that are sacked less have a much higher chance of making the playoffs. Six of the 10 Teams that were sacked the least made the playoffs. of Five out of these six teams also had over 4,000 passing yards as well which if your team is not sacked lot and also has over 4,000 passing yards your odds to make the playoffs increase exponentially five out of the seven teams made the playoffs also looking at this you can see that one of the teams that was sacked the least also won the superbowl(Rams) so you can conclude that getting sack less and throwing for over 4,000 yards is a winning formula in the NFL. Comparing this to the most sacked teams we see less success in this category. Only two out of the top 10 most sacked teams made the playoffs this year. One of which is the Bengals who have a great quaterback and had a defense that played outstanding this year as well that is how I believe they found success in this season they also had the most passing yards out of all of these teams which shows that they were still able to find success in their offense and this eventually led to them making the superbowl, but then in the superbowl was not able to protect the QB which ulitimately led to them losing. Another team in the most sacked teams that made the playoffs was the Titans. They found success still by running the ball they ran the ball the most out of any team this season while also getting lucky being in a division that was weak this year with only one team in the division with a record over .500. Another factor for them was they had a defense that gave up the 6th least point which is excelent. Granted they found ways to win ultimatley fell short and in the playoffs with reason being giving up sacks and then the qb not throwing the ball for very many yards ultimately showing how passing is extremly important for a teams success overall. In conclusion we can see that teams that were sacked the most had a harder time finding success with with eight out of the ten having records under .500, while teams that gave up the least amount of sacks found much more success and if they passed the ball well (4000+ yards) the they had a 71% chance of making the playoffs. This also really shows the importance of of being able to pass the ball showing that teams that found success passing the ball overall just had more success.The teams that passed well and got sacked less found a ton of success while even the Bengals who got sacked a ton still were able to find success and it was from passing the ball well extemly well making up them allowing so many sacks but eventually still came back to bite them while the team they lost to in the superbowl did not allow many sacks while also having a very successful passing offense which lead to a game winning drive which ended a game winning touchdown thrown by the Rams.
#sacks to passing attemptssack_data %>%ggplot(aes(reorder(NULL.Team, NULL.Sck), NULL.Att, fill = SackCategory)) +geom_bar(stat ="identity") +labs(x ="Team", y ="Passing Attempts") +facet_wrap(~ SackCategory, scales ="free", nrow =1) +scale_fill_manual(values =c("orange", "blue"), guide =FALSE) +theme(axis.text.x =element_text(angle =45, hjust =1)) +ggtitle("Comparison of Passing Attempts Between Most and Least Sacked Teams in 2021")
#Sacks to Total first downssack_data %>%ggplot(aes(reorder(NULL.Team, NULL.Sck), NULL.1st, fill = SackCategory)) +geom_bar(stat ="identity") +labs(x ="Team", y ="Number of 1st Downs") +facet_wrap(~ SackCategory, scales ="free", nrow =1) +scale_fill_manual(values =c("orange", "blue"), guide =FALSE) +theme(axis.text.x =element_text(angle =45, hjust =1)) +ggtitle("Comparison of First Downs Between Most and Least Sacked Teams in 2021")
What is being shown are the teams that faced the least and most sacks, and their passing attempts throughout the season. Surprisingly, there isn’t a strong correlation evident here. I anticipated teams with more sacks would throw the ball more due to being in unfavorable positions where they lose yards and need to recover them. However, it’s apparent that teams facing fewer sacks tend to pass the ball more. This trend emerges because they enjoy better protection, resulting in more first downs overall. This pattern seems apparent as teams conceding sacks lose yards, making it challenging to achieve a first down. Once again, the more successful teams in the most sacked category registered significantly higher numbers of first downs compared to others. Notably, the Bengals ranked second, despite being the second most sacked team, demonstrating their ability to secure first downs and win games despite losing plays like sacks. Another standout team, the Ravens, secured 209 first downs, along with the highest number of passing attempts in the most sacked category. Despite this, their season ended with a losing record. This might be attributed to the quarterback’s season-ending injury, altering their course and leading to more sacks, ultimately impacting their season negatively.
This bar chart shows us the top 10 best passing teams of the season. A takeaway looking at this tells us that a team that passes the ball well should find success in that season. Nine out of the ten best passing teams made the playoffs, this shows us the importance of passing the ball and it does lead to winning overall. Every team had a record over .500 which is considered a good season.
This just shows is the teams with the highest QB rating throughout the season. Based off seeing this we can conclude that having a quaterback who performs well is important and leads to winning as seven out of these ten teams made the playoffs. This is not the most important statistic you can look at as the teams that made the superbowl did not have their QBs in the top 10 QBR so this shows that it is an important stat to consider but is not the most important.
Passing Yards Compared to Passing Touchdowns
This is just showing us the correlation that passing yards and passing touchdowns are correlated. This shows us the more passing yards a team has the more touchdowns they will score, which is a variable that is extremely important for winning games.
Conclusion
After analyzing this data, the significance of having a strong passing offense becomes evident. A crucial discovery indicates that teams safeguarding their quarterbacks tend to achieve more success compared to those that don’t. This was evident when contrasting the most sacked teams against the least sacked ones, where the Super Bowl winner emerged from the least sacked group. However, an anomaly exists in the Bengals, who achieved success despite being the most sacked team. Although they managed to compensate for the sacks, the lack of adequate pass protection cost them the Super Bowl.
We also explored the definition of a good passing offense. Examining the top 10 teams in passing yards revealed that nine out of ten made the playoffs, suggesting that a strong passing offense is associated with higher total passing yards throughout the season. Additionally, we assessed the Quarterback Rating (QBR), acknowledging its importance but recognizing it as just one among various key statistics for a successful passing offense and a team’s triumph.
Finally, we examined the correlation between passing yards and passing touchdowns, observing a direct relationship. More passing yards often translate into more passing touchdowns, resulting in increased points, ultimately contributing to more victories. Overall, passing plays a pivotal role, and a proficient passing offense significantly impacts a team’s success in championship pursuits. This analysis revealed several crucial factors that influence the statistics of a successful passing team.