elishayer / mRchmadness

NCAA men's basketball data scraping and bracketology R package
18 stars 10 forks source link

Update package for 2023 tournaments #35

Closed saberpowers closed 1 year ago

saberpowers commented 1 year ago

data.men.2023 = prep.data( year = 2023, league = "men", region.rank = c("South" = 1, "Midwest" = 2, "West" = 3, "East" = 4), skip.population.distribution = FALSE, # skip if population picks aren't ready yet skip.game.results = TRUE # skip if you've already done it ) bracket.men.2023 = data.men.2023$bracket pred.538.men.2023 = data.men.2023$pred.538 pred.pop.men.2023 = data.men.2023$pred.pop teams.men = data.men.2023$teams save(bracket.men.2023, file = "data/bracket.men.2023.RData") save(pred.538.men.2023, file = "data/pred.538.men.2023.RData") save(pred.pop.men.2023, file = "data/pred.pop.men.2023.RData") save(teams.men, file = "data/teams.men.RData")

- [x] Update the Roxygen documentation
- [x] Update the vignette for the new year
- [x] Update the version number!
- [x] Check that `vignette("mRchmadness")` works locally
- [x] Check that `shiny::runApp("inst/shinyApp")` works locally
- [x] Deploy app on shinyapps.io (after merging PR into master)
```r
# Install mRchmadness FROM GITHUB (so rsconnect knows where to find it)
devtools::install_github("elishayer/mRchmadness", ref = "master")
rsconnect::deployApp("inst/shinyApp/", appName = "mRchmadness")

Note to self: It's sufficient to get the basic plan ($39/month). Just make sure to switch over to the 3X-Large (8 GB) instance in the application's settings.

saberpowers commented 1 year ago

I've (mostly) written a function that (mostly) automates this whole process. The downside is that it relies on 538 for the bracket, and 538 doesn't publish their data until the day after Selection Sunday, I think. So my plan is to wait until tomorrow morning to finish this up.

(I gave up on the kenpom predictions because I couldn't automate that download and because it doesn't cover the women's tournament.)

saberpowers commented 1 year ago

I felt the burn of using our period.case (instead of snake_case) variable naming scheme on this one. It turns out that update.data and prepare.data are invalid function names in R packages 😂