Skip to content

Instantly share code, notes, and snippets.

Avatar

ChiBearsStats

View GitHub Profile
@ChiBearsStats
ChiBearsStats / Icing the Kicker
Created Feb 17, 2020
Does Icing the Kicker Matter?
View Icing the Kicker
library(tidyverse)
library(nflscrapR)
library(ggthemes)
#I already have 2009 - Present data compiled. If you do not have NFL PBP data, see nflscrapR, @LeeSharpeNFL, or @BenBaldwin for their tutorials for pulling NFL pbpdata
kicking <- pbpfull %>%
select(posteam, defteam, desc, half_seconds_remaining, qtr, field_goal_attempt, field_goal_result, kick_distance, timeout, timeout_team, score_differential) %>%
mutate(timeoutbeforekick = ifelse(lag(timeout) == 1, 1, 0),
timeoutteam = ifelse(timeoutbeforekick == 1, lag(timeout_team), 0),
View Trubisky the Scrambler
library(tidyverse)
library(dplyr)
library(ggplot2)
library(ggrepel)
library(ggimage)
library(ggthemes)
library(cowplot)
#Pre-Loaded Data. See Ben Baldwin's Tutorial for help loading/wrangling the pbp data (https://gist.github.com/guga31bb/5634562c5a2a7b1e9961ac9b6c568701)
pbp_all_rp <-
@ChiBearsStats
ChiBearsStats / RIP Parkey & the Insignificance of Kickers
Created Aug 12, 2019
RIP Parkey & the Insignificance of Kickers
View RIP Parkey & the Insignificance of Kickers
library(dplyr)
library(nflscrapR)
library(tidyverse)
library(ggrepel)
library(ggimage)
pbp_all <- readRDS("pbpdata2009to2019.rds") #I just use prescraped data, but if you don't know where to get this, I would recommend reading Ben Baldwin's tutorial:
#(https://gist.github.com/guga31bb/5634562c5a2a7b1e9961ac9b6c568701)
@ChiBearsStats
ChiBearsStats / Anthony Miller
Last active Sep 7, 2019
Chicago Bears Receivers / Anthony Miller
View Anthony Miller
library(tidyverse)
library(dplyr)
library(ggplot2)
library(ggrepel)
pbp_all <-
readRDS("pbpdata2009to2019.rds")
pbp_2018 <-
pbp_all %>% filter(season == 2018)
View adjustedthirddowns.txt
library(dplyr)
library(nflscrapR)
library(tidyverse)
library(ggrepel)
library(ggimage)
#Load the PBP Data from 2009-2018 (based on Ben Baldwin's post)
first <- 2009 #first season to grab. min available=2009
You can’t perform that action at this time.