Skip to content

Instantly share code, notes, and snippets.

View thomasmartins's full-sized avatar

Thomas Martins/Martinez thomasmartins

View GitHub Profile
@bayesball
bayesball / home_run_prediction_2.R
Last active April 14, 2020 03:49
Prediction of 2019 HR counts using random effects model
################################################
## NEW WORK - August 2, 2019
################################################
#########################################
# data for 1631 games through August 1
#########################################
library(tidyverse)
library(CalledStrike)
@guga31bb
guga31bb / nflscrapr.md
Last active August 18, 2023 07:45
Simple guide for using nflscrapR

THIS IS OUTDATED. PLEASE FOLLOW THE FOLLOWING LINK

--> A beginner's guide to nflfastR <--

Basic nflscrapR tutorial

I get a lot of questions about how to get nflscrapR up and running. This guide is intended to help new users build interesting tables or charts from the ground up, taking the raw nflscrapR data.

Quick word if you're new to programming: all of this is happening in R. Obviously, you need to install R on your computer to do any of this. Make sure you save what you're doing in a script (in R, File --> New script) so you can save your work and run multiple lines of code at once. To run code from a script, highlight what you want, right click, and select Run line. As you go through your R journey, you might get stuck and have to google a bunch of things, but that's totally okay and normal. That's how I wrote this thing!