eoppe1022 / elite

A Package for Scraping Hockey Data from EliteProspects
32 stars 14 forks source link

Argument 2 must be length 23, not 24 #2

Closed gregalytics closed 5 years ago

gregalytics commented 5 years ago

I get the following error on the following: -Occurred upon using bchl and superelit.

Error: In cbind_all(x) : Argument 2 must be length 23, not 24 teams_bchl <- get_teams("bchl", 2000:2018)

Also may be a stupid question but J.T. Miller had 21 USHL points and 35 USDP points in 2011. get_teams is successful when looking up "ushl" teams, but not "usdp" teams. Are they mutually exclusive from each other, and if so how would I go about getting the player_stats_team for who he played with if the league would be "usdp". https://www.eliteprospects.com/player/38624/j.t.-miller

Thanks! package.version says 1.0 if that is by chance the cause of the issue.

eoppe1022 commented 5 years ago

Hi Greg,

Sorry that there have been so many issues for you. Can you re-try the USDP thing? I think I fixed that.

Still working on the other BCHL and SuperElit thing.

eoppe1022 commented 5 years ago

I think I may have fixed the BCHL and SuperElit issues too. Could you give the package a re-install (devtools::install_github("eoppe1022/elite", force = TRUE)) and let me know if it works for you?

gregalytics commented 5 years ago

get_teams seems cured. I do find the problem with cbinds again on the get_player_stats_team function after though:

This works teams_khl <- get_teams("khl", 2000:2018)

This doesn't khl_players <- get_player_stats_team(teams_khl)

_Error in cbindall(x) : Argument 2 must be length 36, not 33

I haven't found the cbind issue on the get_player_stats_individual(), which is good.

eoppe1022 commented 5 years ago

Okay I know exactly why. I'm still working on a long-term fix.

Are you doing something that you need a quick fix right now?

Because I want to re-look at it so that I don't have these issues anymore, but that might take a little while.

gregalytics commented 5 years ago

Absolutely no rush

Sent from my iPhone

On Jan 30, 2019, at 2:31 PM, Evan Oppenheimer notifications@github.com wrote:

Okay I know exactly why. I'm still working on a long-term fix.

Are you doing something that you need a quick fix right now?

Because I want to re-look at it so that I don't have these issues anymore, but that might take a little while.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

eoppe1022 commented 5 years ago

Believe it or not, I think I fixed it. Yay!

Important though -- I set it up so that you won't be able to get KHL data for 2000, as the KHL technically didn't exist in 2000. You'll have to get "Russia" data for 2000, as that's what the league is called on EliteProspects. You may have been able to get away with getting "KHL" data pre 2008-09, but that won't work anymore.

eoppe1022 commented 5 years ago

Also Greg, please keep posting issues if you find them. I know it sucks to do it, but I really appreciate it, because I have to try and fix it in the end anyways. And thanks for doing whatever you've been doing -- it helps so much.