Giter Club home page Giter Club logo

fantasyfootballanalyticsr's People

Contributors

blacknred0 avatar chadwittman avatar isaactpetersen avatar mgriebe avatar michaelgriebe avatar mrdandersen avatar new10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fantasyfootballanalyticsr's Issues

Error when adding new site

Here is the code I'm using to add the rotoworld projection file that I downloaded:

# sites
sites = rbind(sites, list(21, "Rotoworld", 1, "NA"))

# analysts
analysts = rbind(analysts, list(30, "Rotoworld", 21, 1, 0, "NA", 0.428))

# analystPositions
analystPositions = rbind(analystPositions, list(233, 30, 1, 0, "QB"), list(233, 30, 1, 0, "RB"), list(233, 30, 1, 0, "WR"), list(233, 30, 1, 0, "TE"))

# siteUrls
siteUrls = rbind(siteUrls, list(21, "/rotoworld/rotoworld_{$Season}_{$WeekNo}.csv")

# siteTables
rbind(siteTables, list(175, "QB", 21, 1, 1, 1, 1, 0, "QB"), list(176, "RB", 21, 1, 1, 1, 1, 0, "RB"), list(177, "WR", 21, 1, 1, 1, 1, 0, "WR"), list(178, "TE", 21, 1, 1, 1, 1, 0, "TE"))

# dataColumns
# start at 251
lrow = max(dataColumns$dataColId)
dataColumns = rbind(dataColumns, list(lrow+1, "player", "character"), 
      list(lrow+2, "pos", "character"),
      list(lrow+3, "team", "character"),
      list(lrow+4, "g", "numeric"),
      list(lrow+5, "pass_yds", "numeric"),
      list(lrow+6, "pass_td", "numeric"),
      list(lrow+7, "pass_int", "numeric"),
      list(lrow+8, "rush_yds", "numeric"),
      list(lrow+9, "rush_td", "numeric"),
      list(lrow+10, "rec_yds", "numeric"),
      list(lrow+11, "rec_td", "numeric"),
      list(lrow+12, "fpts", "numeric"))

# tableColumns
# tableId, columnName, columnType, columnOrder, columnPeriod, removeColumn
# rotoworld tableIds 175-qb, 176-rb, 177-wr, 178-te
# datacolumnids 251-262
# player 251, pos 252, team 253, g 254, pass_yds 255, pass_td 256, pass_int 257,
# rush_yds 258, rush_td 259, rec_yds 260, rec_td 261, fpts 262
tableColumns = rbind(tableColumns, 
      list(175, "player", "character", 1, "season", 0),
      list(175, "pos", "character", 2, "season", 0),
      list(175, "team", "character", 3, "season", 0),
      list(175, "g", "numeric", 4, "season", 0),
      list(175, "pass_yds", "numeric", 5, "season", 0),
      list(175, "pass_td", "numeric", 6, "season", 0),
      list(175, "pass_int", "numeric", 7, "season", 0),
      list(175, "rush_yds", "numeric", 8, "season", 0),
      list(175, "rush_td", "numeric", 9, "season", 0),
      list(175, "rec_yds", "numeric", 10, "season", 0),
      list(175, "rec_td", "numeric", 11, "season", 0),
      list(175, "fpts", "numeric", 12, "season", 0),
      list(176, "player", "character", 1, "season", 0),
      list(176, "pos", "character", 2, "season", 0),
      list(176, "team", "character", 3, "season", 0),
      list(176, "g", "numeric", 4, "season", 0),
      list(176, "pass_yds", "numeric", 5, "season", 0),
      list(176, "pass_td", "numeric", 6, "season", 0),
      list(176, "pass_int", "numeric", 7, "season", 0),
      list(176, "rush_yds", "numeric", 8, "season", 0),
      list(176, "rush_td", "numeric", 9, "season", 0),
      list(176, "rec_yds", "numeric", 10, "season", 0),
      list(176, "rec_td", "numeric", 11, "season", 0),
      list(176, "fpts", "numeric", 12, "season", 0),
      list(177, "player", "character", 1, "season", 0),
      list(177, "pos", "character", 2, "season", 0),
      list(177, "team", "character", 3, "season", 0),
      list(177, "g", "numeric", 4, "season", 0),
      list(177, "pass_yds", "numeric", 5, "season", 0),
      list(177, "pass_td", "numeric", 6, "season", 0),
      list(177, "pass_int", "numeric", 7, "season", 0),
      list(177, "rush_yds", "numeric", 8, "season", 0),
      list(177, "rush_td", "numeric", 9, "season", 0),
      list(177, "rec_yds", "numeric", 10, "season", 0),
      list(177, "rec_td", "numeric", 11, "season", 0),
      list(177, "fpts", "numeric", 12, "season", 0),
      list(178, "player", "character", 1, "season", 0),
      list(178, "pos", "character", 2, "season", 0),
      list(178, "team", "character", 3, "season", 0),
      list(178, "g", "numeric", 4, "season", 0),
      list(178, "pass_yds", "numeric", 5, "season", 0),
      list(178, "pass_td", "numeric", 6, "season", 0),
      list(178, "pass_int", "numeric", 7, "season", 0),
      list(178, "rush_yds", "numeric", 8, "season", 0),
      list(178, "rush_td", "numeric", 9, "season", 0),
      list(178, "rec_yds", "numeric", 10, "season", 0),
      list(178, "rec_td", "numeric", 11, "season", 0),
      list(178, "fpts", "numeric", 12, "season", 0)
)

# see if it works
scrapeData <- runScrape(week = 0, season = 2016, analysts = c(-1, 5, 7, 18, 27, 30), positions = c("QB", "RB", "WR", "TE"))

This produces the following output:

Retrieving player data 
Error in if (dataType %in% c("file", "csv") & urlSite != "fantasysharks") { : 
  argument is of length zero

Do you have any suggestions about the source of the error? I've attached an excerpt of the csv file.

rotoworld_2016_0.txt

Trouble with running script IDP.R

Hi - Thanks for putting all of this together. So, I've gotten to the point where it's having trouble with object.analyst and so, I'm walking through the Prepare Data.R Data scripts and running the first Ranking Script (the functions already successfully ran) and getting this error:

Error in IDP[, c("Player (team, bye)")] : incorrect number of dimensions
In addition: Warning message:
XML content does not seem to be XML: 'https://www.fantasypros.com/nfl/rankings/idp-cheatsheets.php'

Weekly projections not working on 0.1.91

I am not sure if I am doing something wrong or what, so, I am going to label this as an issue for now.

Here is what I have done, now if I run the getProjections() function, the result is blank (see image further below)

myScrapeData <- runScrape(week = 6, season = 2016, analysts = c(-1, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19), positions = c("QB", "RB", "WR", "TE", "K", "DST", "DL", "LB", "DB"), fbgUser = NULL, fbgPwd = NULL)
myProjections <- getProjections(myScrapeData, avgMethod = "average", leagueScoring = userScoring, vorBaseline, vorType, teams = 10, format = "standard", mflMocks = -1, mflLeagues = -1, adpSources = c("ESPN"))

Results
screen shot 2016-10-18 at 11 54 25 am
Log

Calculating risk

Listening on http://127.0.0.1:3569

Warning messages:
1: Weekly ECR ranks not available for IDP
2: Weekly ECR ranks not available for IDP
3: Weekly ECR ranks not available for IDP
4: Weekly overall rankings not available

Thoughts?

scrape_data not working

my_scrape <- scrape_data(src = c("CBS", "ESPN", "Yahoo", "NFL"), pos = c("QB", "RB", "WR", "TE", "DST"), season = 2018, week = 0)

returns

Error in transpose(.) : Item 1 of list input is not an atomic vector

ffanlytics package 2.0.0.1003

Apologize if it has been addressed earlier. If so could someone refer me to the resolution.

Thanks,

Sandeep

Detailed Traceback:

9.transpose(.)
8.function_list[[i]](value)
7.freduce(value, _function_list)
6._fseq(_lhs)
5.eval(quote(_fseq(_lhs)), env, env)
4.eval(quote(_fseq(_lhs)), env, env)
3.withVisible(eval(quote(_fseq(_lhs)), env, env))
2.map(pos, ~map(projection_sources[src], ~.x)) %>% transpose() %>% map(~imap(.x, ~scrape_source(.x, season, week, .y))) %>% transpose() %>% map(discard, is.null) %>% map(bind_rows, .id = "data_src")
1.scrape_data(src = c("CBS", "ESPN", "Yahoo", "NFL"), pos = c("QB", "RB", "WR", "TE", "DST"), season = 2018, week = 0)

Adding Scoring Settings In Calculate Projections?

Is it possible to add additional scoring settings to the Calculate Projections? For instance, in the Scoring Settings under QB, there are 300 Yd, 350 Yd, and 400 Yd passing bonuses, however my league uses 250 Yd, 300 Yd, and 350 Yd bonuses. Is it possible to add to the Scoring Settings to include the 250 Yd bonus? This is just one example. My league also uses WR receiving yard bonuses which are not included in the Scoring Settings.

Running library(ffanalytics) from the source files?

I am having trouble finding resources on how to run files from the source. I am currently running a custom R Script with R Studio's that looks a lot like the included league scoring example followed by scrapeProjections followed by getProjections. It work perfect when loading the package that you created, but I would like to begin writing my own code and want to be able to modify the source files. So far:

  1. Installed R (3.3.1 latest)
  2. Installed Latest R Studios
  3. Cloned the whole github repository to my computer
  4. Open */FantasyFootballAnalyticsR/R Package/ffanalytics/ffanalytics.Rproj with R Studios

If I now open up my script file I created before what do I need to do to run it and have it find and load all of the Functions?

Ive been trying to emulate the Main.R file you created previously:

source(paste(getwd(),"/R Scripts/Functions/Functions.R", sep=""))
source(paste(getwd(),"/R Scripts/Functions/League Settings.R", sep=""))

Thanks for any help!!
Matt

ESPN Projections Overall and Position Ranks Not Applied Correctly

I'm running R version 3.1.2 (2014-10-31) on x86_64-apple-darwin13.4.0.

It looks like the cause is the order function is sorting characters, rather than numerics, so at some point, the as.numeric function needs to be applied to the points field. See line 129 and 132 of the "ESPN Projections.R" file.

Simple solution:
projections_espn <- projections_espn[order(-as.numeric(points))][,overallRank := 1:.N]

This problem is causing Geno Smith to be ranked the top QB. :)

Error in runScrape()

All,
I'm getting an issue when trying to run a simple scrape (below). I tried debugging but no luck (i'm also no expert). Any thoughts?

Error in setkeyv(..., physical = FALSE) :
4 arguments passed to .Internal(nchar) which requires 3

Thanks,
Mark

Error when running scrape_data

When I run:

library(ffanalytics)

my_scrape <- scrape_data(src = c("CBS", "ESPN", "Yahoo"),

  •                      pos = c("QB", "RB", "WR", "TE", "DST"),
    
  •                      season = 2018, week = 0)
    

I get the following error:

Scraping QB projections from
https://www.cbssports.com/fantasy/football/stats/sortable/points/QB/standard/projections/2018/?print_rows=9999
Error: Column 1 must be named.
Use .name_repair to specify repair.
Call rlang::last_error() to see a backtrace
Called from: abort(error_column_must_be_named(bad_name))
Browse[1]>

Any thoughts on what might be going on?

Update GitHub repo with scripts

Update scripts for:

  • scraping
  • calculating projected points
  • calculating risk
  • re-distributing data (if missing, use avg; re-distibuting WalterFootball and Kickers)
  • calculating VOR
  • calculating projected cost
  • determing optimal starting lineup

R fatal error

Windows 7 32-bit, RStudio 0.99.902, R 3.3.1, Tried both admin and non-admin accounts

Installed R & RStudio & devtools. I did not install RStudioapi since it was installed under devtools.

Using "devtools::install_github(repo = "dadrivr/FantasyFootballAnalyticsR", subdir = "R Package/ffanalytics")" to install the ffanalytics R package, this is returned "Downloading GitHub repo dadrivr/FantasyFootballAnalyticsR@master
from URL https://api.github.com/repos/dadrivr/FantasyFootballAnalyticsR/zipball/master". About a minute later, a window appears reading "R Session Aborted - R encountered a fatal error."

Please provide any solutions you may have.

Cannot find playerId object

Hi, I believe a commenter on the package website had a similar issue. In a call to getProjections(), I get the error object 'playerId' not found. I've stripped down my code so that all I run upon startup is:

library("ffanalytics")
scrapeData <- runScrape(week = 1, season = 2016, analysts = 4, positions = c("QB"))
myProjections <- getProjections(scrapeData, leagueScoring = scoringRules)

It scrapes the data successfully, but dies getting the projections during or after the Retrieving overall ECR ranks stage. A playerId variable is indeed one of the elements of the resultData class in my scrapeData list. playerId also exists as a character vector in playerData, but changing this to numeric type (as it is in my scrapeData) did not solve the issue. Including other input arguments for getProjections() did not change anything.

I'm using R 3.3.1, R Studio 0.99.903, and ffanalytics 0.1.7. Any suggestions for how to move forward would be appreciated.

Thanks!

undefined columns in projections_fp

Hi,

I'm new at commenting on GitHub, so forgive me if I'm not doing this right.

When I get to line 125:

#Order variables in data set
projections_fp <- projections_fp[,c(prefix, paste(varNames, suffix, sep="_"))]

I get the following error

Error in [.data.frame(projections_fp, , c(prefix, paste(varNames, suffix, :
undefined columns selected

projections_fp
[1] name player_fp.x passAtt_fp passComp_fp
[5] passYds_fp passTds_fp passInt_fp rushAtt_fp
[9] rushYds_fp rushTds_fp fumbles_fp pts_fp
[13] pos.x rec_fp recYds_fp recTds_fp
[17] fg_fp fga_fp xp_fp returnTds_fp
[21] twoPts_fp name_fp.x team_fp.x name_fp.y
[25] player_fp.y pos.y team_fp.y overallRank_fp
[29] positionRank_fp

What's going on?

Thanks.

Football outsiders support

Can you provide support for .csv file from Football Outsiders? I've attached a sample of their format. If you have a list of columns that you need to make the import easier, I can write a script to transform their csv file to something that can be imported into ffanalytics

Thanks!

football-outsiders-sample.csv.zip

Reposting Issue from other repo.

I have found the following issues with projection sources retrieved using scrape_data for season = 2019 and week = 0:

ESPN: No data is scraped. Projections are publicly available. Likely a scraping issue.

FantasyData: No data is scraped. The free projections are for a limited number of players; full projections are available only with a paid subscription. I suspect this is no longer a valid public data source.

FleaFlicker: No data is scraped. A free membership is required to access projections. This may simply require a revision to incorporate login with credentials.

FantasyFootballNerd: The scraped data is incorrect. For example, Calvin Johnson is projected as the #1 WR. It appears that free projections are available, so this may just require fixing the script.

WalterFootball: The projections for most positions don't include TD projections. I couldn't find projections on the website in HTML, so I couldn't determine if this is an error or if WF doesn't project TDs (which makes the projections much less useful).

Thanks!

projections_fp

I get this error when trying to run the "FantasyPros Projections.R"

Error in $<-.data.frame(*tmp*, "positionRank_fp", value = 0) :
replacement has 1 row, data has 0

FantasyPros Scrape fails for all positions but DST

Scrape summary is below. The FantasyPros scrape is failing for nearly all positions when running the scrape script below.

myScrapeData <- runScrape(week = 0, season = 2016,
analysts = c(-1, 3, 4, 5, 6, 7, 9, 11, 12, 13, 14, 15, 22, 23, 17, 18, 19, 20, 28),
positions = c("QB", "RB", "WR", "TE", "K", "DST"),
fbgUser = "my_username", fbgPwd = "my_password")

Scrape Summary:
QB :
Successfully: CBS Average, Yahoo Sports, ESPN, NFL, FOX Sports, FFToday, David Dodds, Maurile Tremblay, Bob Henry, Jason Wood, FantasySharks, FantasyData
Failed: FantasyPros, EDS Football, FantasyFootballNerd, WalterFootball
RB :
Successfully: CBS Average, Yahoo Sports, ESPN, NFL, FOX Sports, FFToday, David Dodds, Maurile Tremblay, Bob Henry, Jason Wood, FantasySharks, FantasyFootballNerd, WalterFootball, FantasyData
Failed: FantasyPros, EDS Football
WR :
Successfully: CBS Average, Yahoo Sports, ESPN, NFL, FOX Sports, FFToday, David Dodds, Maurile Tremblay, Bob Henry, Jason Wood, FantasySharks, FantasyFootballNerd, WalterFootball, FantasyData
Failed: FantasyPros, EDS Football
TE :
Successfully: CBS Average, Yahoo Sports, ESPN, NFL, FOX Sports, FFToday, David Dodds, Maurile Tremblay, Bob Henry, Jason Wood, FantasySharks, FantasyFootballNerd, WalterFootball, FantasyData
Failed: FantasyPros, EDS Football
K :
Successfully: CBS Average, Yahoo Sports, NFL, FOX Sports, FFToday, David Dodds, Maurile Tremblay, FantasySharks, FantasyFootballNerd, WalterFootball, FantasyData
Failed: FantasyPros, Mike Herman
DST :
Successfully: CBS Average, Yahoo Sports, NFL, FOX Sports, FFToday, David Dodds, Maurile Tremblay, FantasySharks, FantasyFootballNerd, FantasyData
Failed: NA

runScrape scope problem

When trying to call runScrape after loading the ffanalytics and data.table packages, I get 'Error in duplicated(siteId) : Object 'siteId' not found.

Looking in R Package/ffanalytics/R at runScrape.R, it appears to be line 190. I think it needs to be this:

periodAnalysts[duplicated(siteId), siteId]

instead of

periodAnalysts$siteId[duplicated(siteId)]

For what it's worth, I'm using data.table 1.9.4 and R-3.2.0.

Invalid Command Name "toplevel"

Tried running scrape a few times with no luck.

OS: OSX
Using RStudio: 0.99.893
R Version: 3.3.3
Sample Input:

myProjections <- getProjections(scrapeData=runScrape(week = 0, season = 2016, analysts = c(-1, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 25, 26, 27), positions = c("QB", "RB", "WR", "TE", "K", "DST", "DL", "LB", "DB")), avgMethod = "robust", leagueScoring = userScoring, vorBaseline, vorType, teams = 12, format = "standard", mflMocks = 1, mflLeagues = 1, adpSources = c("CBS", "ESPN", "FFC", "MFL", "NFL", "Yahoo"))`

Error Returned:

Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : 
  [tcl] invalid command name "toplevel".

I played around with a few options in the config to see if it had something to do with the lack of data available this early, but didn't have any luck getting it to run.

It seems like I was able to sucessfully pull data.
rstudio_player_data_table

Problem Installing ffanalytics Package

Hello -

I'm unable to download your package. The code and error are below. Please let me know what I need to do differently. Thanks for all your work!

library("devtools")
library("rstudioapi")

devtools::install_github(repo = "dadrivr/FantasyFootballAnalyticsR", subdir = "R Package/ffanalytics")

Downloading GitHub repo dadrivr/FantasyFootballAnalyticsR@master
from URL https://api.github.com/repos/dadrivr/FantasyFootballAnalyticsR/zipball/master
Error in utils::unzip(src, exdir = target) :
cannot open file 'C:/Users/JOHN~1.COR/AppData/Local/Temp/RtmpKid3s6/devtools3688383f6eed/dadrivr-FantasyFootballAnalyticsR-53c3723/R Markdown/SubcriptionAccuracy/subscriptionAccuracy_cache/markdown_phpextra+backtick_code_blocks/unnamed-chunk-1_af5e2a896358b9ccbc8241e876b9ce5c.RData': No such file or directory

Error when running runScrape

I tried running a scrape on the 2016 season for all the free projection sources. The script ran for a while (~15 minutes?) and then I got the following error. What's going on? The error message makes it hard to know what's going on, which is frustrating.

myScrapeData <- runScrape(week = 0, season = 2016, analysts = c(-1, 3, 4, 5, 6, 7, 9, 17, 18, 19, 20, 28), positions = c("QB", "RB", "WR", "TE", "K", "DST"), fbgUser = NULL, fbgPwd = NULL)

Retrieving player data 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=0&startIndex=0 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=0&startIndex=40 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=0&startIndex=80 
Removing columns after column 13 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=0&startIndex=120 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=0&startIndex=160 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=0 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=40 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=80 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=120 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=160 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=200 
Removing columns after column 13 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=240 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=280 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=320 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=360 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=2&startIndex=400 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=0 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=40 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=80 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=120 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=160 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=200 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=240 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=280 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=320 
Removing columns after column 13 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=360 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=400 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=440 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=480 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=4&startIndex=520 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=0 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=40 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=80 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=120 
Removing columns after column 13 
Got more columns in data than number of columns specified by names from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=160 
Removing columns after column 13 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=200 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=240 
Empty data table retrieved from
 http://games.espn.go.com/ffl/tools/projections?&slotCategoryId=6&startIndex=280 
Error in UseMethod("xmlNamespaceDefinitions") : 
  no applicable method for 'xmlNamespaceDefinitions' applied to an object of class "NULL"
In addition: There were 50 or more warnings (use warnings() to see the first 50)

Subscript out of bounds error

When the Calculation Settings page loads, getting "Error: subscript out of bounds error" where the position tier values would appear. This occurs when any position other than QB is selected.

image

Console error
Warning: Error in [[: subscript out of bounds
Stack trace (innermost first):
96: tag
95: tags$input
94: tag
93: tags$div
92: div
91: textInput
90: tag
89: tags$div
88: tag
87: tags$div
86: tag
85: tags$div
84: div
83: column
82: FUN
81: lapply
80: tagList
79: tag
78: tags$div
77: div
76: fluidRow
75: FUN
74: lapply
73: vorUI
72: renderUI
71: func
70: output$vorData
3: shiny::runApp
2: runGadget
1: Run_Projection

Issue failed to load external entity

R Version 3.3.3 and R Studio version 1.1.447

I click Addins at the top > Calculate Projections > fill out everything and run the following:

myProjections <- getProjections(scrapeData=runScrape(week = 0, season = 2018, analysts = c(4, 9), positions = c("QB")), avgMethod = "average", leagueScoring = userScoring, vorBaseline, vorType, teams = 10, format = "standard", mflMocks = -1, mflLeagues = -1, adpSources = c("CBS", "ESPN", "FFC", "MFL", "NFL", "Yahoo"))
Retrieving player data
Operation in progressfailed to load external entity "http://football.myfantasyleague.com/2018/export?TYPE=players&L=&W=0&JSON=0&DETAILS=1"
Error: 1: Operation in progress2: failed to load external entity "http://football.myfantasyleague.com/2018/export?TYPE=players&L=&W=0&JSON=0&DETAILS=1"

I am not sure why I am receiving that error. Anyone know how to fix this?

Problem installing latest package (ffanalytics_0.1.91.tar.gz)

When installing the latest package, I had issues on a Windows machine. There was a no such file or directory exists error for the following file:

...dadrivr-FantasyFootballAnalyticsR53c3723/R Markdown/SubcriptionAccuracy/subscriptionAccuracy_cache/markdown_phpextra+backtick_code_blocks/unnamed-chunk-1_af5e2a896358b9ccbc8241e876b9ce5c.RData

I attempted installation using devtools and also by downloading the file locally first.

The ffanalytics_0.1.9.tar.gz package installed just fine.

I'm happy to provide more details if you'd like.

historical weekly projections?

Just curious, I don't see it but I might be missing something. Do you have historical week-by-week projections? I think some of your analyses (e.g. weekly variability) would be more interesting looking at the deviation from weekly projection rather than the raw score. I'd be interested in exploring this myself but don't have the data. Thoughts?

glpk dependency issues

Running source("main.R") fails to install Rglpk due to a dependency on glpk that dependencies=TRUE can not resolve. I had to manually install glpk to resolve the issue. I'm on macOS so I used homebrew to brew install glpk.

Error:

Error in library("Rglpk") : there is no package called ‘Rglpk’

From Traceback to library("Rglpk") at Functions.R#11 it appears Rglpk did not install.

Running install.packages("Rglpk", dependencies=TRUE) gives the following output:

Installing package into ‘/usr/local/lib/R/3.4/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/Rglpk_0.6-3.tar.gz'
Content type 'application/x-gzip' length 20892 bytes (20 KB)
==================================================
downloaded 20 KB

* installing *source* package ‘Rglpk’ ...
** package ‘Rglpk’ successfully unpacked and MD5 sums checked
** libs
/bin/sh: line 0: cd: GLPK: No such file or directory
make: *** [GLPK.ts] Error 1
ERROR: compilation failed for package ‘Rglpk’
* removing ‘/usr/local/lib/R/3.4/site-library/Rglpk’
Warning in install.packages :
  installation of package ‘Rglpk’ had non-zero exit status

It appears to be CRAN/R problem.

Problem with installation

Hey guys

  • total noob with R, but not a total idiot I hope.

[After installing devtools and rstudioapi] Trying to install the package - whether I try

  1. devtools::install_github(repo = "dadrivr/ffanalytics")
  2. manual + package dependencies

I run into the same error from Rterm.exe - Entry Point Not Found

"The procedure entry point deflateSetHeader could not be located in the dll C:...R-34~1.1\Tcl\bin64\tcl86.dll"

Here is the console from RStudio:

  • installing source package 'ffanalytics' ...
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** preparing package for lazy loading
    Error : .onLoad failed in loadNamespace() for 'tcltk', details:
    call: inDL(x, as.logical(local), as.logical(now), ...)
    error: unable to load shared object 'C:/Program Files/R/R-3.4.1/library/tcltk/libs/x64/tcltk.dll':
    LoadLibrary failure: The specified procedure could not be found.

ERROR: lazy loading failed for package 'ffanalytics'

  • removing 'C:/Users/francois/Documents/R/win-library/3.4/ffanalytics'
    Installation failed: Command failed (1)

Anybody know what I am doing wrong? Saw a few other posts on the net, but nothing with a solution.

Thanks!

error--rbind.fill

I get this error when running a few of the site projection scripts:
Error: could not find function "rbind.fill"

Collate field missing

Hi,

I'm receiving the following error when installing the ffanalytics package.
Error in .install_package_code_files(".", instdir) :
files in 'Collate' field missing from 'C:/Users/sa69/AppData/Local/Temp/RtmpMFtqov/devtools36341af07bdf/dadrivr-FantasyFootballAnalyticsR-e3dbc95/R Package/ffanalytics/R':
tableMerge.R

I think this is because tableMerge.R does not exist in the ffanalytics/R folder but I'm not sure?

Thanks!

2QB projection format

I have a question about the projections. It may be a an error on my end, a bug, or need to alter the model.

I'm in a superflex (2qb) league. When entered the custom roster in and saved the settings, the resulting model placed QB1 Patrick Mahomes at rank 21. In every superflex ranking site I've seen (fantasypros, cbs, etc), Mahomes is ranked as #1 or #2 overall, with multiple other QB's going in the first round.

Is there something wrong I'm doing? Or is it something about the model I don't understand? I apologize if this method of communication was strictly for bugs, but I figured it's related to the model itself if it isn't a bug.

Thanks,
Chris

RELEASE 0.1.9 error in getting projections or scraping

I've been testing 0.1.9 and I get this error

library("ffanalytics")
myProjections <- getProjections(scrapeData=runScrape(week = 3, season = 2016, analysts = c(-1, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19), positions = c("QB", "RB", "WR", "TE", "K", "DST")), avgMethod = "average", leagueScoring = userScoring, vorBaseline, vorType, teams = 12, format = "standard", mflMocks = -1, mflLeagues = -1, adpSources = c("ESPN"))
Error in analystOptions(scrapePeriod) :
lazy-load database '/home/user/R/x86_64-pc-linux-gnu-library/3.3/ffanalytics/data/Rdata.rdb' is corrupt
In addition: Warning messages:
1: In analystOptions(scrapePeriod) :
restarting interrupted promise evaluation
2: In analystOptions(scrapePeriod) : internal error -3 in R_decompress1

any thoughts on what it could be?

Error - getProjections

Hi - I'm getting an error when I try to use the getProjections function (In this example, I'm using the addin to trigger the function, but I get the same error when I do it manually):

myProjections <- getProjections(scrapeData=runScrape(week = 6, season = 2016, analysts = c(3), positions = c("QB")), avgMethod = "average", leagueScoring = userScoring, vorBaseline, vorType, teams = 12, format = "standard", mflMocks = -1, mflLeagues = -1, adpSources = NULL)

Retrieving player data

Scrape Summary:
QB :
Successfully: Yahoo Sports
Failed: NA

Retrieving ECR ranks for position
Error in data.table::setnames(rnks, cNames) :
Can't assign 7 names to a 8 column data.table

Not sure what to make of this...any thoughts?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.