Skip to content

Instantly share code, notes, and snippets.

View friscojosh's full-sized avatar
🏈
Triggering the innumerates & rubes

Josh Hermsmeyer friscojosh

🏈
Triggering the innumerates & rubes
View GitHub Profile
@friscojosh
friscojosh / madden_ratings.csv
Last active July 21, 2023 17:03
madden ratings
We can't make this file beautiful and searchable because it's too large.
fullNameForSearch,team,position,overall_rating,college,awareness_rating,throwPower_rating,kickReturn_rating,leadBlock_rating,strength_rating,bCVision_rating,catchInTraffic_rating,playAction_rating,pursuit_rating,plyrAssetname,mediumRouteRunning_rating,catching_rating,acceleration_rating,spinMove_rating,finesseMoves_rating,spectacularCatch_rating,runBlock_rating,tackle_rating,injury_rating,zoneCoverage_rating,deepRouteRunning_rating,firstName,yearsPro,totalSalary,trucking_rating,throwAccuracyShort_rating,jukeMove_rating,playRecognition_rating,shortRouteRunning_rating,status,lastName,jerseyNum,breakSack_rating,speed_rating,runBlockPower_rating,jumping_rating,toughness_rating,throwOnTheRun_rating,manCoverage_rating,stiffArm_rating,powerMoves_rating,iteration,release_rating,hitPower_rating,throwAccuracyMid_rating,kickAccuracy_rating,passBlockPower_rating,impactBlocking_rating,stamina_rating,carrying_rating,breakTackle_rating,plyrPortrait,kickPower_rating,plyrHandedness,throwUnderPressure_rating,signingBonus,passB
arrows <-
tibble(
x1 = -.06,
x2 = -.01,
y1 = 600,
y2 = 500
)
all_N_week_means |>
ggplot(aes(x = epa)) +

14. Set up a Python Development Environment

Install pyenv

Prerequisites for pyenv

sudo apt-get update; sudo apt-get install make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
@friscojosh
friscojosh / Defense doesn't matter
Last active May 16, 2021 22:38
Defense doesn't matter
###########################################
### Testing whether YPA allowed and
### AYA allowed by a defense matters when
### projecting an offense's YPA or AYA
### coming into a particular week.
###########################################
### SQL used to generate the data from nfldb by burntsushi
### nflplay, a dependency is maintained seperately
@friscojosh
friscojosh / WOPR Stability
Last active January 27, 2021 16:13
WOPR year over year stability analysis
############################################################################
#### Grab airyards data from airyards.com and test the year-to-year
#### stability of WOPR (Weighted Opportunity Rating)
############################################################################
library(tidyverse)
library(jsonlite)
## define a function that uses jsonlite to call the airyards.com
## API and returns the processed JSON as a dataframe.
@friscojosh
friscojosh / sv_sim_grid_expand.R
Last active April 8, 2020 18:59
Shadow Vulnerability simulation
library("tidyverse")
library("tidylog")
### Mechanic explantion
# When your SB crits, a debuff (shadow vulnerability=SV) is placed on your
# target. That debuff increases ALL shadow damage taken by 20% and can last
# up to 12 seconds. So SV will actually increase the damage:
#
# - your shadow dots tick for,
@friscojosh
friscojosh / isb_sim.R
Last active April 7, 2020 22:41
Improved Shadow Bolt uptime estimates
library("tidyverse")
library("tidylog")
### Mechanic explantion
# When your SB crits, a debuff (shadow vulnerability=SV) is placed on your
# target. That debuff increases ALL shadow damage taken by 20% and can last
# up to 12 seconds. So SV will actually increase the damage:
#
# - your shadow dots tick for,
@friscojosh
friscojosh / gist:8c22d38d44166ab03c528eed2733993f
Last active October 6, 2018 05:18
Testing the year to year stability of snaps for the WR position
###########################################
### Testing the year to year stability of
### snaps for the WR position
### Josh Hermsmeyer 10-5-18
###########################################
### SQL to generate the dataset from Armchair Analysis
# SELECT a.player, a.snp, a.trg, b.fname, b.lname, b.pos1, c.seas
# FROM offense a
# INNER JOIN player b ON a.player = b.player
@friscojosh
friscojosh / gist:e20f063f9c6e90d985cd88469b3889af
Created September 25, 2018 05:23
Completion Probability Stability Testing
library(tidyverse)
data <- read_csv("data/xcomp.csv")
data_joined <- data %>%
mutate(season2 = Season + 1) %>%
inner_join(data, by = c("NAME", "season2" = "Season"))
model_expected <- lm(data = data_joined, `xCOMP%.y` ~ `xCOMP%.x`)
summary(model_expected)
@friscojosh
friscojosh / gist:d50a7314d55c930fe8c28ef564b71870
Last active September 20, 2018 17:14
Analysis of holding calls by play type
###################################################
#### Analysis of holding calls by play type
#### Data from nfldb by burntsushi
#### https://github.com/BurntSushi/nfldb
#### Josh Hermsmeyer 9/20/18
###################################################
library(tidyverse)
### Load the play descriptions and play types