-
Notifications
You must be signed in to change notification settings - Fork 48
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
Location coordinate alignment #99
Location coordinate alignment #99
Conversation
… court corresponding to (0, 0)
…t background generated from sportyR
…rom get_shot_loc()
…eck() note/warning)
Hi Ross! This is extremely helpful! I am going to let the package stay as is for the remainder of this season but will review all this and integrate your changes following the end of the Final Four in two weeks time. Thanks so much for this outstanding contribution. |
@rossdrucker I will review this week and merge |
…) is a function...?)
@lbenz730 Just calling your attention to the commits I just pushed tonight for your review. They're mostly intended to help clear some (not all) of the NOTEs and WARNINGs when running |
@rossdrucker This looks fantastic. Thank you for your tremendous contribution. Feel free to make additional contributions as you see fit. Your support and collaboration is much appreciated |
@rossdrucker I made one small tweak to address a bug in
Don't feel any pressure to do any of this but those are some related tasks if you're up for it. Happy to offer co-authorship for your assistance. In any case, you've already done outstanding outstanding work and made the package better! NOTE to self: closed #74 after this PR |
@lbenz730 Happy to take some of that on as I have time to do so, although it may be a bit more spread out over the offseason. May be worth revisiting some of those issues and continuing discussion there to keep things organized. Just as a quick note, the three-point arc is moved back to the correct spot. It's customizable though through |
Thanks @rossdrucker ! No time pressure at all. Really appreciate your help w/ this. I merged #100 and pushed a update to DESCRIPTION to make you listed as an author. You've done some really helpful work already and I look forward to continuing our collaboration! |
Much appreciated @lbenz730, I'm looking forward to continuing collaborating as well! I'll probably open up a few issues, but quickly wanted to check if the goal is to put this on CRAN? |
I'm not entirely sure what that would entail. Given the frequent updates that may be annoying to maintain and keep re-submitting to CRAN but if you think it's not too much work we can consider it. |
I noticed while debugging this issue that there was a slight error in the way that the coordinates for shot location data are processed. In the commits in this PR, I've re-aligned the coordinate data to mirror what exists with the ESPN "standard" via the following:
(x, y)
coordinates to create a horizontal court, as is the standard (e.g. this shot chart)(0, 0)
corresponds to center courtAfter making these changes in the
get_shot_loc()
function, I updated shot chart plotting functions to utilize this new coordinate alignment. In these functions, I changed the base plot to use thesportyR
package for three reasons:sportyR
makes updating court features (e.g. three-point line distance) easier to maintain than the static coordinates currently shipped with the package. Not needing these should hopefully reduce some of the load time of the package as wellncaahoopR
, I can add in arguments to the appropriate plotting functions that can then be passed tosportyR::geom_basketball()
to color the court as desired by the user.Other minor edits I made are really just to use consistent namespacing throughout the package and reduce notes when running
devtools::check()
; can help more with this as necessary and desired.Let me know if anything here can/should be updated. I greatly appreciate the review and consideration!