BillPetti / baseballr

A package written for R focused on baseball analysis. Currently in development.
billpetti.github.io/baseballr
Other
369 stars 101 forks source link

error in scrape_statcast_savant #193

Closed kfcaby closed 3 years ago

kfcaby commented 3 years ago

Hi, I teach a sabermetrics course at West Point and have been using the baseballr package with my students to import statcast pitch level data.

This morning, we all started getting the error: "Can't transform a data frame with duplicate names" when we use the scrape_statcast_savant function (see attached). I get the same error when I run old code that used to work.
error

BillPetti commented 3 years ago

They made some changes to the cvs return. I pushed an update this morning. Give it another try after the reinstall. Also, don't use scrape_statcast_savant_batter--that function is getting deprecated. Use scrape_statcast_savant('2019-03-15', '2019-11-01', player_type = 'batter', playerid = mlbID) instead.

Let me know if that solves things.

kfcaby commented 3 years ago

Thanks for your quick response! That worked.

BTW, the baseballr package is great. Extremely helpful for classes like mine.

jestarr commented 3 years ago

Quick question: Is reinstall done via: devtools::install_github("BillPetti/baseballr") or should I install the dev branch listed?

BillPetti commented 3 years ago

Master, not dev branch