diff --git a/R Scripts/Weekly Projections/Gold Mining/wr_tiers_MRG.R b/R Scripts/Weekly Projections/Gold Mining/wr_tiers_MRG.R index 6080f99..d7dfe47 100644 --- a/R Scripts/Weekly Projections/Gold Mining/wr_tiers_MRG.R +++ b/R Scripts/Weekly Projections/Gold Mining/wr_tiers_MRG.R @@ -81,30 +81,30 @@ NAtoZero(espn) espn[,player:=NULL] # Get FF Today WR Data #### -# fft_pos<-list(QB=10,RB=20,WR=30,TE=40,K=80) -# fft_base_url<-paste("http://www.fftoday.com/rankings/playerwkproj.php?Season=", -# year(seasonStart),"&GameWeek=",next_week, -# "&LeagueID=1&order_by=FFPts&sort_order=DESC&PosID=",fft_pos[[spos]],sep="") -# fft_pages<-c("0","1") -# fft_urls<-paste(fft_base_url,"&cur_page=",fft_pages,sep="") -# fft<-lapply(fft_urls,function(x) {data.table(readHTMLTable(x, as.data.frame=TRUE, stringsAsFactors=FALSE)[11]$`NULL`)}) -# #Do row removal pior to rbind -# for(i in 1:length(fft)) { -# ##Delete Row 1 -# fft[[i]]<-fft[[i]][2:nrow(fft[[i]])] -# } -# fft<-rbindlist(fft) -# ##Add week, pos, src, and writer. -# fft[,c("week","pos","src","writer","scoring"):=list(next_week,spos,"fft","fft","std")] -# ##Delete extraneous collumns -# fft[,c("V1","V4"):=NULL] -# ##setnames -# setnames(fft,c("V2","V3","V5","V6","V7","V8"),c("player","team","rec","rec_yd","rec_td","fpts")) -# ##Add player name -# fft[,name:=str_replace_all(player, "^Â\\s+", "")] -# ##convert to numeric -# fft[,c("rec","rec_yd","rec_td","fpts"):=lapply(list(rec,rec_yd,rec_td,fpts),as.numeric)] -# fft[,player:=NULL] +fft_pos<-list(QB=10,RB=20,WR=30,TE=40,K=80) +fft_base_url<-paste("http://www.fftoday.com/rankings/playerwkproj.php?Season=", + year(seasonStart),"&GameWeek=",next_week, + "&LeagueID=1&order_by=FFPts&sort_order=DESC&PosID=",fft_pos[[spos]],sep="") +fft_pages<-c("0","1") +fft_urls<-paste(fft_base_url,"&cur_page=",fft_pages,sep="") +fft<-lapply(fft_urls,function(x) {data.table(readHTMLTable(x, as.data.frame=TRUE, stringsAsFactors=FALSE)[11]$`NULL`)}) +#Do row removal pior to rbind +for(i in 1:length(fft)) { + ##Delete Row 1 + fft[[i]]<-fft[[i]][2:nrow(fft[[i]])] +} +fft<-rbindlist(fft) +##Add week, pos, src, and writer. +fft[,c("week","pos","src","writer","scoring"):=list(next_week,spos,"fft","fft","std")] +##Delete extraneous collumns +fft[,c("V1","V4"):=NULL] +##setnames +setnames(fft,c("V2","V3","V5","V6","V7","V8"),c("player","team","rec","rec_yd","rec_td","fpts")) +##Add player name +fft[,name:=str_replace_all(player, "^Â\\s+", "")] +##convert to numeric +fft[,c("rec","rec_yd","rec_td","fpts"):=lapply(list(rec,rec_yd,rec_td,fpts),as.numeric)] +fft[,player:=NULL] # Get FF Sharks Data #### ffs_pos=list(QB="QB",RB="RB",WR="WR",TE="TE",flex="FLEX",K="PK",DEF="D") @@ -187,8 +187,8 @@ for(i in 1:length(ranks)){ # Aggregate #### -#proj<-list(cbs,espn,ffs,fft,fx,pp,yahoo) -proj<-list(cbs,espn,ffs,fx,pp,yahoo) +proj<-list(cbs,espn,ffs,fft,fx,pp,yahoo) +#proj<-list(cbs,espn,ffs,fx,pp,yahoo) for(i in 1:length(proj)){ setcolorder(proj[[i]],c("pos","week","name","team","rec","rec_yd","rec_td","fpts","scoring","src","writer")) diff --git a/RMarkdown/GoldMining/GoldMining.Rmd b/RMarkdown/GoldMining/GoldMining.Rmd index ac2030a..f5b8242 100644 --- a/RMarkdown/GoldMining/GoldMining.Rmd +++ b/RMarkdown/GoldMining/GoldMining.Rmd @@ -1,7 +1,7 @@ --- title: "Gold Mining" author: "Fantasy Football Analytics" -date: "Friday, October 31, 2014" +date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document --- @@ -38,7 +38,7 @@ htests[,c("std_pm","std_pm_l","std_pm_h"):=list(vapply(std_h.l,function(x){x$est vapply(std_h.l,function(x){x$conf.int[2]},double(1)))] #clustering based on means. -htests[,c("ppr_tier","std_tier"):=list(Mclust(ppr_mean, G=7)$classification,Mclust(std_mean,G=7)$classification)] +htests[,c("ppr_tier","std_tier"):=list(Mclust(ppr_pm, G=7)$classification,Mclust(std_pm,G=7)$classification)] htests[,c("ppr_h.l","std_h.l"):=NULL] htests[order(-ppr_pm),ppr_rank:=1:.N] @@ -52,8 +52,8 @@ wpremium htests[,std_upside:=std_pm_h-std_pm] htests[,std_downside:=std_pm-std_pm_l] -std_big_upsides<-htests[order(-std_upside)][1:5][order(std_ave_rank)][,unique(name)] -std_small_downsides<-htests[order(std_downside)][1:5][order(std_ave_rank)][,unique(name)] +htests[,ppr_upside:=ppr_pm_h-ppr_pm] +htests[,ppr_downside:=ppr_pm-ppr_pm_l] p_and<- function(x) { paste(paste(x[1:(length(x)-1)],collapse=", "), "and", x[length(x)]) @@ -61,17 +61,16 @@ p_and<- function(x) { ``` -The graph below summarises the projections from a variety of sources. This week's summary includes projections from: `r paste(writers[ffa[,unique(writer)]],collapse=", ")`. +The graph below summarizes the projections from a variety of sources. This week's summary includes projections from: `r p_and(writers[ffa[,unique(writer)]])`. ## Standard Scoring Leagues - -### Week `r next_week` Wide Recievers +### Week `r next_week` Wide Receivers From this graph be sure to notice: - - `r p_and(htests[order(-std_upside)][1:5][order(std_ave_rank)][,unique(name)])` have particularly high upsides. For these players, some projections are placing much higher valuations than others. If you need to introduce some uncertainty into your game plan, these may be the players to consider. - - `r p_and(htests[order(std_downside)][1:5][order(std_ave_rank)][,unique(name)])` have little downside to them, which suggests that while their median projection might not be great, there is less uncertainty concerning how poorly they may perform. - - On the other hand, `r p_and(htests[order(-std_downside)][1:8][order(std_ave_rank)][,unique(name)])` have relatively large downsides this week. If you are planning on starting them, it may be prudent to investigate. + - `r p_and(htests[order(-std_upside)][1:5][order(std_ave_rank)][,unique(name)])` are the five players with the largest upside (as measured from their (pseudo)medians). For these players, some projections are placing much higher valuations than others. If you are projected to lose this week by quite a few points and are looking for a risky play that may tip the balance in your favor, these are players to consider. + - `r p_and(htests[order(std_downside)][1:5][order(std_ave_rank)][,unique(name)])` are the playres with the smallest downside, which suggests that while their median projection might not be great, there is less uncertainty concerning how poorly they may perform. So, if your are likely to win by a lot and want to reduce your downside risk, these players may deserve extra attention. + - On the other hand, `r p_and(htests[order(-std_downside)][1:5][order(std_ave_rank)][,unique(name)])` are the five playres with the largest downside this week. If you are planning on starting them, it may be prudent to investigate why some projections have such low expectations for these players.
The graph below summarises the projections from a variety of sources. This week’s summary includes projections from: Fantasy Football Sharks, CBS’s Jamey Eisenberg, CBS’s Dave Richard, ESPN, Picking Pros, Yahoo Sports, Fox Sports.
+The graph below summarizes the projections from a variety of sources. This week’s summary includes projections from: Fantasy Football Sharks, CBS’s Jamey Eisenberg, CBS’s Dave Richard, Fantasy Football Today, ESPN, Picking Pros, Yahoo Sports and Fox Sports.
From this graph be sure to notice:
name | -Lowest Projection | -Highest Projection | -Mean Projection | -Standard Deviation | -Median Projection | -Average Rank | -
---|---|---|---|---|---|---|
Demaryius Thomas | -13.00 | -18.00 | -15.610 | -2.165 | -16.00 | -1.857 | -
Jordy Nelson | -11.40 | -18.00 | -15.440 | -2.286 | -16.00 | -3.857 | -
Antonio Brown | -12.10 | -17.00 | -14.931 | -1.809 | -14.22 | -3.143 | -
Emmanuel Sanders | -10.20 | -17.00 | -13.896 | -2.554 | -14.00 | -6.714 | -
Calvin Johnson | -7.80 | -17.00 | -13.833 | -3.206 | -15.00 | -7.857 | -
Julio Jones | -9.40 | -18.00 | -13.703 | -2.939 | -14.00 | -6.429 | -
Jeremy Maclin | -9.40 | -16.00 | -12.854 | -2.557 | -14.00 | -12.000 | -
DeSean Jackson | -8.47 | -16.00 | -13.053 | -2.767 | -14.00 | -13.857 | -
Randall Cobb | -8.30 | -16.00 | -13.256 | -2.582 | -14.00 | -12.714 | -
T.Y. Hilton | -7.20 | -17.00 | -13.070 | -3.632 | -15.00 | -13.000 | -
A.J. Green | -5.70 | -15.00 | -12.240 | -3.534 | -14.00 | -15.857 | -
Alshon Jeffery | -9.00 | -16.00 | -12.084 | -3.071 | -12.00 | -13.857 | -
Roddy White | -8.70 | -14.00 | -11.404 | -2.127 | -12.00 | -15.286 | -
Kelvin Benjamin | -7.60 | -14.00 | -11.724 | -2.468 | -13.00 | -18.714 | -
Mike Evans | -7.50 | -15.00 | -11.591 | -2.610 | -13.00 | -18.286 | -
Golden Tate | -7.00 | -18.00 | -11.151 | -3.842 | -11.00 | -16.286 | -
Mike Wallace | -9.00 | -13.00 | -10.379 | -1.418 | -10.00 | -21.143 | -
Brandon Marshall | -4.00 | -15.00 | -10.463 | -3.816 | -11.74 | -20.333 | -
Brandon LaFell | -8.40 | -13.00 | -10.685 | -1.919 | -11.00 | -23.667 | -
Sammy Watkins | -7.50 | -13.00 | -10.244 | -2.014 | -10.31 | -23.286 | -
Anquan Boldin | -7.00 | -13.00 | -9.436 | -2.247 | -8.40 | -22.571 | -
Vincent Jackson | -7.00 | -11.85 | -9.021 | -1.787 | -9.00 | -22.714 | -
Julian Edelman | -6.00 | -10.00 | -8.414 | -1.353 | -8.30 | -22.429 | -
Larry Fitzgerald | -5.76 | -14.00 | -9.709 | -3.003 | -9.00 | -23.143 | -
DeAndre Hopkins | -6.60 | -13.00 | -9.560 | -2.244 | -9.00 | -25.000 | -
Martavis Bryant | -6.20 | -13.00 | -10.024 | -2.692 | -11.00 | -32.286 | -
Odell Beckham | -6.00 | -13.00 | -9.309 | -2.794 | -9.46 | -29.286 | -
Brandin Cooks | -6.00 | -11.00 | -8.443 | -2.059 | -8.40 | -26.429 | -
Mohamed Sanu | -6.00 | -11.00 | -8.473 | -1.713 | -8.41 | -31.286 | -
Andre Johnson | -6.00 | -9.57 | -7.778 | -1.198 | -8.00 | -29.167 | -
From this graph be sure to notice:
+name | -Lowest Projection | -Highest Projection | -Mean Projection | -Standard Deviation | -Median Projection | -Average Rank | -
---|---|---|---|---|---|---|
Demaryius Thomas | -19.10 | -27.00 | -23.38 | -3.294 | -23.00 | -1.857 | -
Antonio Brown | -18.10 | -27.00 | -22.72 | -3.277 | -21.80 | -3.143 | -
Jordy Nelson | -17.00 | -25.00 | -21.41 | -2.534 | -22.00 | -3.857 | -
Julio Jones | -14.80 | -28.00 | -20.69 | -4.213 | -20.00 | -6.429 | -
Emmanuel Sanders | -15.40 | -25.00 | -20.37 | -3.502 | -20.00 | -6.714 | -
Calvin Johnson | -11.50 | -23.00 | -19.79 | -4.229 | -21.00 | -7.857 | -
Jeremy Maclin | -13.40 | -22.00 | -18.07 | -3.304 | -19.00 | -12.000 | -
Randall Cobb | -13.10 | -21.00 | -18.31 | -2.769 | -19.00 | -12.714 | -
T.Y. Hilton | -11.40 | -25.00 | -18.91 | -4.773 | -20.00 | -13.000 | -
Alshon Jeffery | -13.90 | -24.00 | -17.76 | -3.902 | -18.00 | -13.857 | -
DeSean Jackson | -12.37 | -22.00 | -17.74 | -3.318 | -18.00 | -13.857 | -
Roddy White | -13.40 | -21.00 | -17.28 | -3.127 | -17.00 | -15.286 | -
A.J. Green | -8.00 | -22.00 | -17.54 | -5.069 | -19.00 | -15.857 | -
Golden Tate | -12.76 | -28.00 | -18.17 | -5.488 | -18.00 | -16.286 | -
Mike Evans | -12.20 | -21.00 | -16.49 | -3.079 | -18.00 | -18.286 | -
Kelvin Benjamin | -12.00 | -20.00 | -16.55 | -3.110 | -17.00 | -18.714 | -
Brandon Marshall | -9.00 | -21.00 | -16.05 | -4.295 | -16.99 | -20.333 | -
Mike Wallace | -13.35 | -19.00 | -15.08 | -1.936 | -14.40 | -21.143 | -
Julian Edelman | -12.00 | -16.00 | -14.54 | -1.395 | -15.00 | -22.429 | -
Anquan Boldin | -12.95 | -20.00 | -15.16 | -2.788 | -14.00 | -22.571 | -
Vincent Jackson | -11.50 | -17.55 | -14.36 | -2.089 | -14.00 | -22.714 | -
Sammy Watkins | -11.90 | -18.00 | -14.94 | -2.334 | -15.51 | -23.286 | -
Larry Fitzgerald | -10.26 | -20.00 | -15.31 | -3.525 | -16.00 | -23.143 | -
Brandon LaFell | -12.90 | -19.00 | -15.47 | -2.386 | -15.50 | -23.667 | -
DeAndre Hopkins | -10.50 | -18.00 | -14.49 | -2.720 | -14.00 | -25.000 | -
Brandin Cooks | -11.00 | -16.00 | -13.67 | -1.864 | -13.60 | -26.429 | -
Odell Beckham | -8.40 | -19.00 | -13.79 | -3.603 | -13.96 | -29.286 | -
Andre Johnson | -11.00 | -14.97 | -13.11 | -1.334 | -13.00 | -29.167 | -
Pierre Garcon | -10.96 | -22.00 | -13.77 | -3.709 | -13.00 | -30.286 | -
Keenan Allen | -10.00 | -14.00 | -12.25 | -1.528 | -13.00 | -30.714 | -
If you are fairly confident that one of your league mates only uses one source and you know what that source is, you may be able to get them to trade a player to you that is undervalued by that source. Likewise you may be able to trade to them a player that is overvalued by that source. The table below shows the difference between the source projection and the mean projection for each player. A negative number means the source undervalues the player and a positive number means the source over-values the player.
+Suppose your league is a yahoo league. It is likely that your league mates use yahoo projections to value trades. Sometimes yahoo places a very high valuation on a players performance. If that’s the case, and you have one or two of those players, you may be able to trade those players away for players with higher consensus value.
+name | +dave_richard | +espn | +ffs | +fx | +jamey_eisenberg | +pp | +yahoo | +
---|---|---|---|---|---|---|---|
A.J. Green | +2.7600 | +2.7600 | +2.7600 | +-1.5400 | +1.7600 | +-6.5400 | +-1.9600 | +
Alshon Jeffery | +-0.0843 | +0.9157 | +3.9157 | +-2.8843 | +3.9157 | +-3.0843 | +-2.6943 | +
Andre Holmes | +-2.6229 | +-1.6229 | +0.3771 | +2.1771 | +-1.6229 | +2.3771 | +0.9371 | +
Andre Johnson | +0.2217 | +-1.7783 | +-0.7783 | +0.3217 | +0.2217 | +NA | +1.7917 | +
Andrew Hawkins | +-6.0350 | +4.9650 | +-0.0350 | +2.2650 | +-2.0350 | +NA | +0.8750 | +
Anquan Boldin | +3.5643 | +-1.4357 | +-2.4357 | +-1.0357 | +2.5643 | +0.1643 | +-1.3857 | +
Antonio Brown | +1.0686 | +-0.9314 | +2.0686 | +-2.8314 | +2.0686 | +-0.7314 | +-0.7114 | +
Brandin Cooks | +2.5571 | +-2.4429 | +-2.4429 | +-0.5429 | +2.5571 | +-0.0429 | +0.3571 | +
Brandon LaFell | +1.3150 | +1.3150 | +2.3150 | +-2.2850 | +-0.6850 | +NA | +-1.9750 | +
Brandon Marshall | +1.5367 | +-6.4633 | +1.5367 | +-2.1633 | +4.5367 | +NA | +1.0167 | +
Calvin Johnson | +2.1671 | +1.1671 | +2.1671 | +-2.0329 | +3.1671 | +-6.0329 | +-0.6029 | +
Cordarrelle Patterson | +-0.0343 | +3.9657 | +-3.0343 | +0.3657 | +-1.0343 | +-0.8343 | +0.6057 | +
DeAndre Hopkins | +-0.5600 | +3.4400 | +-1.5600 | +-2.9600 | +2.4400 | +0.1400 | +-0.9400 | +
DeSean Jackson | +1.9471 | +1.9471 | +2.9471 | +-2.7529 | +0.9471 | +-0.4529 | +-4.5829 | +
Demaryius Thomas | +1.3900 | +0.3900 | +2.3900 | +-2.6100 | +2.3900 | +-1.9100 | +-2.0400 | +
Doug Baldwin | +-0.7443 | +3.2557 | +-0.7443 | +0.7557 | +-0.7443 | +-1.9443 | +0.1657 | +
Dwayne Bowe | +-2.4414 | +-0.4414 | +-0.4414 | +4.3586 | +-0.4414 | +-0.4414 | +-0.1514 | +
Eddie Royal | +-4.1014 | +-3.1014 | +4.8986 | +3.3986 | +-1.1014 | +1.7986 | +-1.7914 | +
Emmanuel Sanders | +2.1043 | +0.1043 | +2.1043 | +-3.6957 | +3.1043 | +-1.6957 | +-2.0257 | +
Golden Tate | +-0.1514 | +-4.1514 | +6.8486 | +-1.9514 | +0.8486 | +2.3486 | +-3.7914 | +
Greg Jennings | +-0.3700 | +4.6300 | +-1.3700 | +0.1300 | +-3.3700 | +0.5300 | +-0.1800 | +
James Jones | +-2.9314 | +3.0686 | +-0.9314 | +0.7686 | +-0.9314 | +-0.1314 | +1.0886 | +
Jeremy Maclin | +1.1457 | +2.1457 | +3.1457 | +-3.4543 | +1.1457 | +-1.1543 | +-2.9743 | +
John Brown | +4.2200 | +-2.7800 | +-2.7800 | +-0.8800 | +3.2200 | +NA | +-1.0000 | +
Jordan Matthews | +1.4386 | +-4.5614 | +3.4386 | +-1.5614 | +2.4386 | +0.0386 | +-1.2314 | +
Jordy Nelson | +1.5600 | +-0.4400 | +1.5600 | +-4.0400 | +2.5600 | +0.5600 | +-1.7600 | +
Julian Edelman | +-0.4143 | +-2.4143 | +-0.4143 | +-0.1143 | +1.5857 | +0.2857 | +1.4857 | +
Julio Jones | +0.2971 | +1.2971 | +4.2971 | +-4.3029 | +2.2971 | +-2.3029 | +-1.5829 | +
Justin Hunter | +0.9286 | +-3.0714 | +-2.0714 | +-0.8714 | +3.9286 | +-0.4714 | +1.6286 | +
Keenan Allen | +0.7029 | +-2.2971 | +-0.2971 | +1.3029 | +0.7029 | +-1.2971 | +1.1829 | +
Kelvin Benjamin | +1.2757 | +2.2757 | +2.2757 | +-4.1243 | +1.2757 | +-0.6243 | +-2.3543 | +
Kendall Wright | +-1.3900 | +3.6100 | +-1.3900 | +0.1100 | +-1.3900 | +0.0100 | +0.4400 | +
Kenny Britt | +-2.8800 | +4.1200 | +-1.8800 | +2.1200 | +-2.8800 | +-0.7800 | +2.1800 | +
Larry Fitzgerald | +-0.7086 | +3.2914 | +4.2914 | +0.9914 | +-1.7086 | +-2.2086 | +-3.9486 | +
Malcom Floyd | +1.7900 | +-4.2100 | +-2.2100 | +3.7900 | +1.7900 | +-0.0100 | +-0.9400 | +
Markus Wheaton | +-2.0757 | +-1.0757 | +-0.0757 | +2.5243 | +-0.0757 | +0.5243 | +0.2543 | +
Marques Colston | +-1.4543 | +-1.4543 | +-0.4543 | +3.9457 | +-1.4543 | +0.1457 | +0.7257 | +
Martavis Bryant | +0.9757 | +2.9757 | +0.9757 | +-2.7243 | +2.9757 | +-3.8243 | +-1.3543 | +
Michael Crabtree | +0.2471 | +4.2471 | +-1.7529 | +-1.9529 | +-0.7529 | +-0.7529 | +0.7171 | +
Mike Evans | +3.4086 | +1.4086 | +1.4086 | +-4.0914 | +1.4086 | +-1.3914 | +-2.1514 | +
Mike Wallace | +0.6214 | +0.6214 | +2.6214 | +-0.7786 | +-0.3786 | +-1.3786 | +-1.3286 | +
Mohamed Sanu | +2.5271 | +-1.4729 | +-2.4729 | +-0.5729 | +0.5271 | +1.5271 | +-0.0629 | +
Odell Beckham | +3.6914 | +1.6914 | +-2.3086 | +-2.6086 | +2.6914 | +-3.3086 | +0.1514 | +
Pierre Garcon | +-1.2657 | +-2.2657 | +5.7343 | +-0.6657 | +-0.2657 | +-0.0657 | +-1.2057 | +
Randall Cobb | +0.7443 | +-0.2557 | +1.7443 | +-4.9557 | +2.7443 | +1.4443 | +-1.4657 | +
Reggie Wayne | +-0.0400 | +-1.0400 | +-1.0400 | +0.9600 | +-0.0400 | +-0.1400 | +1.3400 | +
Roddy White | +1.5957 | +0.5957 | +1.5957 | +-2.5043 | +2.5957 | +-2.7043 | +-1.1743 | +
Rueben Randle | +-0.9300 | +-1.9300 | +0.0700 | +1.5700 | +-0.9300 | +-0.4300 | +2.5800 | +
Sammy Watkins | +-0.2443 | +1.7557 | +2.7557 | +-2.7443 | +0.7557 | +-2.3443 | +0.0657 | +
T.Y. Hilton | +2.9300 | +1.9300 | +3.9300 | +-5.8700 | +1.9300 | +-1.5700 | +-3.2800 | +
Vincent Jackson | +-0.0214 | +0.9786 | +-2.0214 | +1.1786 | +-1.0214 | +-1.9214 | +2.8286 | +
Wes Welker | +-1.5586 | +-2.5586 | +6.4414 | +2.4414 | +-2.5586 | +-1.8586 | +-0.3486 | +