UNC Men's Basketball Match Results Since 1949-1950 Season

Dataset contains select attributes for each match result since 1949-1950 season for UNC men's basketball team.


Travis-CI Build Status Coverage Status CRAN status

This package contains the University of North Carolina (UNC) Men's basketball team's (and their archrival Duke's) match results since 1949-1950 season with select match attributes. Base match records are obtained from the source (1) below and augmented from the source (2):

  1. http://www.sports-reference.com/cbb/schools/north-carolina/
  2. http://www.tarheeltimes.com/schedulebasketball-1949.aspx

Any data discrepancies are fixed once they are identified.

Installation

# Install the released version from CRAN
install.packages("uncmbb")

Or install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("joongsup/uncmbb")

Examples

library(uncmbb)
library(dplyr)
 
# Match data
tail(unc)
     Season  Game_Date Game_Day   Type Where Opponent_School Result Tm Opp   OT
2187   2018 2018-03-07      Wed CTOURN     N        Syracuse      W 78  59 <NA>
2188   2018 2018-03-08      Thu CTOURN     N           Miami      W 82  65 <NA>
2189   2018 2018-03-09      Fri CTOURN     N            Duke      W 74  69 <NA>
2190   2018 2018-03-10      Sat CTOURN     N        Virginia      L 63  71 <NA>
2191   2018 2018-03-16      Fri   NCAA     N        Lipscomb      W 84  66 <NA>
2192   2018 2018-03-18      Sun   NCAA     N       Texas A&M      L 65  86 <NA>
 
# NCAA championship seasons
unc %>% 
      filter(Type == "NCAA") %>% 
      group_by(Season) %>% 
      summarize(wins = sum(Result == "W"), losses = sum(Result == "L")) %>% 
      filter(losses == 0)
 
# A tibble: 6 x 3
  Season  wins losses
   <chr> <int>  <int>
1   1957     5      0
2   1982     5      0
3   1993     6      0
4   2005     6      0
5   2009     6      0
6   2017     6      0
 
# Highest season win percentage
duke %>% 
      group_by(Season) %>%
      summarize(wins = sum(Result == "W"), losses = sum(Result == "L"), win_perc = round(wins/(wins + losses), 2)) %>%
      arrange(desc(win_perc)) %>%
      head(5)
      
# A tibble: 5 x 4
  Season  wins losses win_perc
   <chr> <int>  <int>    <dbl>
1   1999    37      2     0.95
2   1992    34      2     0.94
3   1986    37      3     0.92
4   1963    27      3     0.90
5   2001    35      4     0.90
      

News

uncmbb 0.2.0

  • Added 2017-2018 season results
  • Added (and exported) mbb functions

uncmbb 0.1.0

  • First release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("uncmbb")

0.2.0 by Jay Lee, a year ago


http://github.com/joongsup/uncmbb


Report a bug at https://github.com/joongsup/uncmbb/issues


Browse source code at https://github.com/cran/uncmbb


Authors: Jay Lee [aut, cre]


Documentation:   PDF Manual  


CC0 license


Imports dplyr, rlang

Suggests testthat, covr


See at CRAN