cran-task-views / ctv

CRAN Task View Initiative
80 stars 13 forks source link

CRAN task view proposal: SportsAnalytics #11

Closed beanumber closed 2 years ago

beanumber commented 2 years ago

Scope

This CRAN Task View contains a list of packages useful for sports analytics, grouped by sport. Following the list of packages, we've included a list of selected books and articles that use some of these packages in substantive ways. Our goal in compiling this list is to help researchers find the tools they need to complete their work in R.

To be considered for inclusion, the package must be useful for conducting sports analytics. Most packages provide functionality for some combination of:

  1. acquiring data for a specific sport or league
  2. performing common computations on sport-specific data

Other packages provide ancillary functionality relevant to sports analytics (e.g., team-themed color palettes). Esports and sports betting packages are within scope.

Packages

Please see https://github.com/beanumber/ctv-sportsanalytics for a comprehensive list and preview of the Task View.

There aren't really "core" packages here, because every sport is different. I suppose that Lahman is the most commonly used package, and I'd hope that teamcolors is the package most likely to be used in combination with any other package.

Note: we composed this by forking eddelbuettel/ctv-finance and will have to convert to the new R Markdown format. We'd be honored to be your guinea pigs in that effort!

Overlap

There is not much overlap between the packages in the SportsAnalytics CTV and the other Task Views. The Lahman package has found its way into teaching materials that cover relational data, but it is not mentioned in the TeachingStatistics CTV.

I suppose it's possible that in the future the sports betting packages could intersect with the Econometrics CTV.

Maintainers

The primary maintainer is Ben Baumer (@beanumber). Co-maintainers include:

zeileis commented 2 years ago

Thanks for the proposal @beanumber

Just FYI: We are currently still very busy with the transition of the old task views to the new infrastructure (as mentioned in the README), so it will take some more weeks before we get round to considering the new task view proposals.

beanumber commented 2 years ago

OK, @zeileis, understood. Thanks for letting us know.

beanumber commented 2 years ago

@zeileis Just checking in to see if there has been any movement on this.

zeileis commented 2 years ago

Apologies for the delay. The transition was taking longer than expected, partially because of Covid and partially because I overestimated the responsiveness of some task view maintainers (see Issues https://github.com/cran-task-views/ctv/issues/19 and https://github.com/cran-task-views/ctv/issues/7). The plan is to finally roll out the new task view workflow on CRAN later this week and then to officially announce it.

Only after the official announcement we will start considering the new proposals and yours is first in the queue. If all goes well, I will initiate the discussion of your proposal next week.

beanumber commented 2 years ago

Great! Thanks for the quick response!

zeileis commented 2 years ago

Overall

Now that the new CRAN Task Views workflow has officially been launched on CRAN, I have also started looking at your proposal in detail. Thanks for the thorough preparation! I like the proposal and endorse it subject to certain improvements (see below).

What do you think @rsbivand @eddelbuettel @rociojoo @davidjohannesmeyer @tuxette ?

Details:

eddelbuettel commented 2 years ago

Luuv the overall topic and have the occassional tab-as-bookmark open in the browser (and once got back to the folks who had one API package out with package improvement suggestion -- which I can't find right now). I don't have a good feel for many packages there are for a) specific APIs for results to feed into analytics, b) specific analytics (but that seems to be growing ...) and c) specific 'viz' packages.

PS Found it via a note I kept, it had to with things inside https://statsbomb.com/wp-content/uploads/2021/11/Working-with-R.pdf

tuxette commented 2 years ago

I agree with Achim's remarks. I don't know if that's what he had in mind but listing the publications in the link section, I would also cite them next to the first mention of the corresponding package in the TV. As minor (non mandatory) suggestions, I would suggest to:

beanumber commented 2 years ago

Thanks for this feedback -- we'll work on these revisions.

zeileis commented 2 years ago

Great, thanks for your efforts! Given we have endorsement from three editors, you can surely move ahead. Maybe the other three might also provide some feedback in the next days, though.

beanumber commented 2 years ago

We have implemented the excellent suggestions from @zeileis @eddelbuettel @tuxette and I think we've addressed all of the issues.

One question re: @tuxette 's comment about publications. I love the doi() function, but then it seems duplicative to have to paste citations in the Links section. Is there a way to have doi() automatically add a citation to Links? I imagine this would work similarly to the way [@cite-key] works in R Markdown, but realize that the architecture here is fundamentally different since there is no LaTeX/BibTeX. [Hmm,...maybe I just answered my own question...]

Can you take another look at the CTV and let us know if there is anything else we can do?

https://github.com/beanumber/ctv-sportsanalytics

tuxette commented 2 years ago

Hi @beanumber : I checked the new version of the CTV. I found a few packages that are no more on CRAN:

"aRbs"           "hockeyR"        "mlbstatsR"      "worldfootballR"

I don't think that there is currently a way to automatically link doi() to Links Section. I find the new version of the task view much better (and it is probably best to have citations duplicated as you currently have now). A last minor remark: as far as I can tell (@zeileis : can you confirm?) you shouldn't cite the GitHub repository for the Task View in Links since it is expected to move to ctv github repository when the TV is accepted.

beanumber commented 2 years ago

That makes sense. @qntkhvn removed those four packages, and I just removed the GitHub entry from the links section.

zeileis commented 2 years ago

Thanks for the update, I agree that this looks very nice now!

Regarding the references: The doi() function really just displays the DOI. Technically, it wouldn't be a problem to repeat just the DOI in the links. But what you really want is a full reference and not just the DOI and for that we would need some additional reference infrastructure (like citeproc or so). I'll think about this. Up to now I thought that it would be enough to link to the packages which in turn would link to the underlying citations etc.

Regarding the GitHub link: This will indeed be standardized when officially adopted.

zeileis commented 2 years ago

I think this task view is ready for acceptance according to our proposal guidelines, provided that we get an endorsement from at least three CRAN Task View Editors. You can tick the boxes below and/or make further comments.

zeileis commented 2 years ago

OK, we definitely have green light for the new project, welcome on board! But we can still wait whether the others have further comments, especially Dirk who might want to follow up on his previous comments.

Regarding the next steps: We will establish a GitHub repository for your task view in the cran-task-views organization. You already have a repository but that originated as a fork of the Finance task view. Hence I think it would be better to re-start from a clean slate now. Do you agree @eddelbuettel ?

beanumber commented 2 years ago

SGTM. Thank you!!

eddelbuettel commented 2 years ago

(As you asked explicitly: No strong opinion in the matter. The only thing that natters is the then-current generated md/ctv/html task view file. Many of us like keeping history, other prefer to burn things down. The presented result is the same. :man_shrugging: )

zeileis commented 2 years ago

"Burn things down" sounds like you do have a slight preference? Or would you think it's worth the effort of filtering the history of the existing task view in order to keep only the things related to SportsAnalytics (as opposed to the Finance pre-history).

[And just in case it isn't clear from my question: I would need your help to do the filtering...if we wanted to do that.]

beanumber commented 2 years ago

Just checking in to see if there is anything else you need from us on this...

zeileis commented 2 years ago

I had waiting for further follow-up but you are right and we should move on. I've set up a new repository now (for the reasons explained above) and invited you, Ben @beanumber, as admin and Quang @qntkhvn and Greg @gjm112 as maintainers.

So far there is only the README and the task view .md file (with minor touch-ups from me, e.g., updating the source link). You can add the other files you need (.gitignore, R code, ...) while some others are possibly not needed anymore. I'll also have another look at the HTML conversion.

After these last modifications we can turn the new repository public and then release everything on CRAN!

zeileis commented 2 years ago

I just opened an issue with a couple of comments at https://github.com/cran-task-views/SportsAnalytics/issues/1. But no immediate action is required for that other than acknowledging it and possibly trying to help resurrect the newly archived packages in the near future.

zeileis commented 2 years ago

Just for the record: The task view is now live on CRAN and public on GitHub.