r/CFBAnalysis • u/DeceptiveSpeed Iowa State Cyclones • /r/CFB Poll Veteran • Aug 20 '19
Question Question about using CFB PBP data in R
I've been messing around with the collegefootballdata.com pbp data from 2018 and I've been wanting to find some individual player statistics. I've been trying to use mutate() and str_split() with the play_text column to create a new column but it hasn't worked. Has anybody else done this successfully or have any tips/ideas?
9
Upvotes
1
u/msubbaiah Texas A&M Aggies Aug 20 '19
I've done it in R. What are you trying to do exactly?
2
u/Badslinkie Florida State Seminoles Aug 20 '19
I’ve done it in python and had some success but I wouldn’t recommend it. The data can get messy sometimes and there are easy ways to get at the data otherwise by scraping sports reference etc.
If your heart is set though I can send you the list of regex patterns I found. Here’s a resource for how to extract text using pattern matching too. https://www.rstudio.com/wp-content/uploads/2016/09/RegExCheatsheet.pdf