#install.packages("tidyverse")
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.2     ✓ purrr   0.3.4
## ✓ tibble  3.0.3     ✓ dplyr   1.0.2
## ✓ tidyr   1.1.2     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.5.0
## ── Conflicts ────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
#install.packages("knitr")
#install.packages("ggthemes")
library(ggthemes)
#install.packages('plotly')
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(knitr)
knitr::include_graphics('NextGen.png')
Image taken from NFL Next Gen Stats website

Image taken from NFL Next Gen Stats website

Date that article was published: August 10, 2020

Summary of Article

The National Football League has started to utilize data more and more in making smarter decisions for their team. One data source in particular has accelerated this process: Next Gen Stats (NGS).

NGS_link <- c("https://nextgenstats.nfl.com/")
NGS_link
## [1] "https://nextgenstats.nfl.com/"

Using NGS, teams have access to the locations of all 22 players on the field for every play of every game. This allows teams to measure stats such as speed, yards after contact, and separation. This article focuses on separation - the distance between a receiver and the defender in coverage. First, the article looks at average separation for every depth of target for play-action and non-play-action throws. After this analysis, the article looks at the short, medium, and long passes to individual receivers, calculating their Separation over Expectation (SoE) using Next Gen Stats. This provides concrete evidence of which receivers are both good and bad at creating separation, and at what distances they excel at.

Play-Action vs Non-Play-Action Separation

Below is a figure created and presented by the author, Josh Hermsmeyer, highlighting the average separation of receivers for play-action and non-play-action passes at all distances

knitr::include_graphics('PAvsNPA.png')
Image taken from Separation over Expectation article, link provided above

Image taken from Separation over Expectation article, link provided above

Sep. Over Expectation Results

Here are some examples included in the article. The data below highlights the best receivers in terms of SoE on deep passes. Both average depth of target and SoE/Play are measured in yards.

deep <- data.frame("Name" = "DJ Chark", "Avg Depth of Target " = 27.1, "SoE/Play " = .41)
Stills <- c("Kenny Stills", 25.4, .40)
Cooper <- c("Amari Cooper", 23.3, .39)
deep <- rbind(deep, Stills, Cooper)
kable(deep)
Name Avg.Depth.of.Target. SoE.Play.
DJ Chark 27.1 0.41
Kenny Stills 25.4 0.4
Amari Cooper 23.3 0.39

Author Information

## [1] "https://twitter.com/friscojosh"

Josh Hermsmeyer is a football writer and analyst working for FiveThirtyEight, writing countless articles. During the COVID-19 Outbreak, he has been using his data science knowledge to write articles about Coronavirus in addition to his NFL work. He has a large following on Twitter, tweeting every day about football-related news. His account can be found below.

Josh Hermsmeyer Twitter

What Do I Think?

I think the article offers interesting analysis on the performance of Wide Receivers. While stats such as receiving yards and touchdowns are heavily dependent on quarterback play, measuring separation does a better job of isolating the performance of the Wide Receiver. I also though it was extremely useful that the author provided analysis on separation for short, medium, and deep passes instead of lumping everything together.

Wine Data Frame

Wine <- read.csv("winequality-red-ddl.csv")
Wine.Update <- head(Wine[c(9, 11:12)], 10)
kable(Wine.Update)
pH alcohol quality
3.25 9.00 3
3.16 8.40 3
3.63 10.70 3
3.38 9.90 3
3.48 11.00 3
3.50 10.90 3
3.32 9.80 3
3.31 9.70 3
3.40 10.20 3
3.55 9.95 3

Wine Boxplot

Wine <- na.omit(read.csv("winequality-red-ddl.csv"))
Wine.top.quality <- filter(Wine, quality > 5)
Wine.top.quality.factors <- mutate(Wine.top.quality,quality=factor(quality,ordered=TRUE,levels=c(6, 7, 8)))
Wine.boxplot <- ggplot(Wine.top.quality.factors,aes(x=quality,y=alcohol)
                     ) + 
                        geom_boxplot() + 
                        xlab('Quality') + 
                        ylab('Alcohol Percentage')+
                        theme_tufte()
ggplotly(Wine.boxplot)