0

I've tried this using nbastatR:

library(nbastatR)
assign_nba_players()
players <- df_dict_nba_players$idPlayer
nba_careers <- players_careers(player_ids= players, modes="PerGame")

But it just ran for multiple days straight. Eventually, I checked Task Manager and saw that "RStudio R Session" was taking up 0 computing power. So I terminated the program. This appears to be a good alternative, but I'm not sure how to get the csv file I need and convert it into a tbl in RStudio. I'm only a few weeks old to R, so any help would be greatly appreciated. Thanks!

Phil
  • 7,287
  • 3
  • 36
  • 66
ZZ5657
  • 1

1 Answers1

0

I've got some code using rvest to scrape Basketball-Reference here, that gets individual-level statistics for box scores by year: https://github.com/markhwhiteii/blog/blob/master/sloppy_play/sloppy_scraping.R

Mark White
  • 1,228
  • 2
  • 10
  • 25
  • Thanks, but is there any way you know of to get per-game career statistics? (One row for every player, not one row for every player in every season they played.) – ZZ5657 Jul 15 '22 at 15:03