Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

free_throw column incorrect #54

Closed
JackLich10 opened this issue Dec 2, 2020 · 3 comments
Closed

free_throw column incorrect #54

JackLich10 opened this issue Dec 2, 2020 · 3 comments

Comments

@JackLich10
Copy link

The free_throw column appears to be NA or FALSE only (it never shows up as being TRUE and all of the shot information of the free throw attempt in shot_team, shot_outcome is NA as well). For example, when running for the Duke vs. Mich St. game: ncaahoopR::get_pbp_game("401260005"), this issue occurs.

@lbenz730
Copy link
Owner

lbenz730 commented Dec 2, 2020

Thanks I will take a look.

@lbenz730
Copy link
Owner

lbenz730 commented Dec 3, 2020

Fixed this in latest commit.

@lbenz730 lbenz730 closed this as completed Dec 3, 2020
@JackLich10
Copy link
Author

The shot_team column is still blank for free throws. I think adding pbp$shot_team[(made_shots | missed_shots) & tolower(pbp$shooter) %in% tolower(home_roster)] <- pbp$home[1] and pbp$shot_team[(made_shots | missed_shots) & tolower(pbp$shooter) %in% tolower(away_roster)] <- pbp$away[1] to the end of the if (extra_parse == T) statement should fix this. I think this problem is occurring this year because ESPN is no longer marking the shot location of free throws as right underneath the basket - (25, 87.94222222222221) or (25, 4.177777777777778).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants