MyNixOS website logo
Description

Access U SPORTS Data.

Tools package to extract and analyze data from U SPORTS, the governing body of university sport in Canada.

usportsR usportsR website

R-CMD-check

usportsR is a package that is designed to provide users with data from all Usports sanctioned sports.

  • The package contains U Sports data spanning over a decade of pre-season, regular season, and post-season matches.

  • Sports currently included are Soccer, Basketball, Ice Hockey, Field Hockey, Track and Field Field Hockey, Football, Wrestling, Swimming and Rugby

  • We currently provide access to box score, play-by-play, schedules and rankings data

Installation

You can install the development version of usportsR from GitHub with:

# install.packages("devtools")
devtools::install_github("uwaggs/usportsR")

Example

This is a basic example which shows you how to solve a common problem:

library(usportsR)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
## basic example to find number of 40+ point games in the last decade

mens_player_box_scores <- basketball_player_box_score("m",c(2023,2022,2021,2019,2018,2017,2016,2015,2014))
mens_40_pt_games <- mens_player_box_scores %>% filter(pts >= 40)
head(mens_40_pt_games,10)
#> # A tibble: 10 × 25
#>    player        min   fgm   fga three_pm three_pa   ftm   fta  oreb  dreb   reb
#>    <chr>       <int> <int> <int>    <int>    <int> <int> <int> <int> <int> <int>
#>  1 Brandon Me…    34    13    24       10       17     5     5     0     5     5
#>  2 Evan Shadk…    49    14    27        7       16     5     6     1     2     3
#>  3 Malcolm Ch…    39    14    26        8       17    15    15     1     1     2
#>  4 Keivonte W…    34    16    22        5        6     3     3     0     3     3
#>  5 Glen Cox       35    16    29        3        5    10    11     4     7    11
#>  6 Osman Omar     33    14    30        3        8    11    11     1     1     2
#>  7 Inaki Alva…    33    14    22        6        8     6     8     1     2     3
#>  8 Diego Maff…    40    13    26        5       13    11    11     0     7     7
#>  9 Mason Bour…    40    14    19        7       10     6     6     0    12    12
#> 10 Osman Omar     43    15    28        2       10     9    11     4     5     9
#> # ℹ 14 more variables: ast <int>, stl <int>, blk <int>, to <int>, pf <int>,
#> #   pts <int>, starter <int>, player_number <int>, player_links <chr>,
#> #   date <chr>, game_id <chr>, team_name <chr>, season <chr>, season_type <chr>
library(ggplot2)
## simple plot to illustrate points vs assists in 40+ point games in Usport basketball games

ggplot(mens_40_pt_games,aes(x = pts,y = ast)) + geom_point() +
  labs(title = "Points Vs Assists in 40 point games", x = "Points",y = "Assists")
Metadata

Version

1.0.0

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows