FantasyFootballAnalytics / FantasyFootballAnalyticsR

R scripts and data files for the Fantasy Football Analytics website
http://fantasyfootballanalytics.net/
447 stars 1.58k forks source link

scrape_data not working #52

Closed sandeepmohan closed 4 years ago

sandeepmohan commented 5 years ago

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)

chudjr commented 5 years ago

As I understand it the data sources changed since that code was published (years ago). You would basically have to rewrite the scraping and parsing based on current data source formats. I ran into the same issue Aug 2017...but never worked through it. The shiny apps on the site provided enough value that I dropped dealing with the code myself.

Good luck.

On Mon, Sep 10, 2018, 3:13 PM sandeepmohan notifications@github.com wrote:

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

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

Thanks,

Sandeep

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FantasyFootballAnalytics/FantasyFootballAnalyticsR/issues/52, or mute the thread https://github.com/notifications/unsubscribe-auth/AdpOnN-vVLlAHRol46ziyKyrfHwUyU3Iks5uZrnegaJpZM4WiAZV .

isaactpetersen commented 4 years ago

See the latest version of the app here: https://github.com/FantasyFootballAnalytics/ffanalytics