almartin82 / projprep

a R package that helps read, clean up, and convert baseball projection data into auction prices.
7 stars 1 forks source link

include ESPN adp #20

Open almartin82 opened 8 years ago

almartin82 commented 8 years ago

similar to #1, this will help us sanity-check our prices

almartin82 commented 8 years ago

@drewgriffith15 shared this snippet:

# Get ESPN ADP
ESPN.ADP <- "http://games.espn.go.com/flb/livedraftresults"
ADP <- readHTMLTable(ESPN.ADP)
ADP <- as.data.frame(ADP[2])

colnames(ADP) <-
  c("Rank","Name","Position","AVGPick","7DayROC","AvgValue","7DayAvgROC","Owned")
# Remove Team Names from Player Name
ADP$Name <- gsub("\\,.*","",ADP$Name)
ADP.df <- sqldf('select Rank as RotoADP, Name
                from ADP p where Name is not null')

generally, having ADP in the package would be great! they provide a great sanity check for top-down valuation approaches, among other benefits