maksimhorowitz / nflscrapR

R Package for Scraping and Aggregating NFL Data
522 stars 139 forks source link

Tweaks to get_rosters() for speed and birthdates #151

Closed tanho63 closed 4 years ago

tanho63 commented 4 years ago

Hiya! I was looking for a way to scrape player birthdates that would match GSIS IDs and figured that I'd go in and use a similar method as set out in the get_rosters() function. I think this could be useful for others too :)

Also, I rearranged the "readHTML" so that it wouldn't be run duplicate times, and limited readlines to 1000 lines so that it would operate a bit faster (GSIS ID is usually in the first ~600 lines)

tanho63 commented 4 years ago

Yay! Now off to run models with each player's age at the time of each play...