FantasyFootballAnalytics / ffanalytics

ffanalytics R package
http://ffanalytics.fantasyfootballanalytics.net/
163 stars 100 forks source link

Error trying to run projections_table #6

Closed tcash21 closed 6 years ago

tcash21 commented 6 years ago
library(ffanalytics)

my_scrape <- scrape_data(src = c("FantasyPros", "NumberFire"), 
                         pos = c("QB", "RB", "WR", "TE", "DST"),
                         season = 2018, week = 0)

my_projections <- projections_table(my_scrape)

Error:

Error in grouped_df_impl(data, unname(vars), drop) : 
  Column `id` is unknown
In addition: Warning messages:
1: Unknown variables: `id`, `data_src` 
2: Unknown variables: `id`, `data_src` 
3: Unknown variables: `id`, `data_src` 
sansbacon commented 6 years ago

Does my_scrape show a list? On my machine, the error is in the projections_table function, not the scrape function. However, if I use more sources there is no error. Try including ESPN, Yahoo, and CBS.

sansbacon commented 6 years ago

I can't say for sure, but I wonder if the additional sources help with the name-matching process. The list of players from myfantasyleague specifies IDs from CBS and ESPN. The projections on ESPN are pretty good since they hired Mike Clay, so you might want to include them anyway.

MrDAndersen commented 6 years ago

There was an issue with the code not handling that neither FantasyPros nor Numberfire project return stats

isaactpetersen commented 5 years ago

Posting this here in case anyone is interested in helping with the project: https://fantasyfootballanalytics.net/2019/09/call-for-help-lead-r-shiny-developer.html