-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
50 lines (36 loc) · 1.8 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# touchbackr
<!-- badges: start -->
<!-- badges: end -->
The touchbackr package exists to quickly aggregate data on kickoffs that are returned out of the end zone in NFL games.
A rule change instituted by the NFL prior to the 2023 season which allows for the receiving team to signal a fair catch at any spot on the field before the 25 yard line and to get the ball at the 25.
The rationale for this change was player safety, and the league office predicted that there would be a [15 percent drop in concussions](https://twitter.com/judybattista/status/1661036967599960068?s=20) due to the rule change.
The data this package delivers is in a sense conservative. It looks at kickoffs that travel into the end zone and calculates the resulting yardage lost or gained on plays where teams decide to return the ball out of the end zone. These are situations where it is extremely difficult to rationalize a positive expected value for returning the ball. These are also situations where players could easily be coached simply take the yards ("if your feet are in the end zone, fair catch it").
## Installation
You can install the development version of touchbackr from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("friscojosh/touchbackr")
```
## Example
```{r example}
library(touchbackr)
library(knitr)
team_end_zone_returns <- touchbackr::get_ez_returns_by_team(2023)
knitr::kable(team_end_zone_returns)
```
```{r example 2}
league_ez_stats <- touchbackr::get_ez_kickoff_league_summary(2023)
knitr::kable(league_ez_stats)
```