Skip to contents

Returns aggregate team stats back to 2008

Usage

bart_team_box(
  year = NULL,
  start = NULL,
  end = NULL,
  team = NULL,
  conf = NULL,
  split = NULL,
  stat = "total",
  aggregate = FALSE,
  ...
)

Arguments

year

Filters to year.

start

Filters to starting year

end

Filters to ending year

team

Filters to team.

conf

Filters to conf.

split

Split to filter (see details).

stat

Filters for agg. stats (total) or avg. stats (avg)

aggregate

Aggregate all years (TRUE) or return per-year stats when passing a range of years (FALSE; default)

...

Any other parameter accepted by the API endpoint

Value

Returns a tibble with the number of columns dependent on the year.

Details

The `split` argument filters the results by split, explained below:

result

Wins and losses

location

Game location

month

Game month

type

Game type

Examples

bart_team_box(split='month', team='Duke')
#> ── Team Stats ────────────────────────────────────────────────── toRvik 1.1.0 ──
#>  Data updated: 2022-09-20 01:39:18 UTC
#> # A tibble: 78 × 40
#>    team  month     year   min   pos   fgm   fga fg_pct   tpm   tpa fg3_pct   ftm
#>    <chr> <chr>    <int> <int> <int> <dbl> <dbl>  <dbl> <dbl> <dbl>   <dbl> <dbl>
#>  1 Duke  April     2010   400   114    52   107  0.486    18    42   0.429    17
#>  2 Duke  April     2015   400   127    50   101  0.495     6    21   0.286    43
#>  3 Duke  April     2022   200    69    30    72  0.417     5    22   0.227    12
#>  4 Duke  December  2008   825   306   125   256  0.488    41    97   0.423    58
#>  5 Duke  December  2009  1000   359   158   316  0.5      36   113   0.319    70
#>  6 Duke  December  2010  1200   423   190   372  0.511    53   115   0.461   103
#>  7 Duke  December  2011  1200   428   181   351  0.516    58   132   0.439   119
#>  8 Duke  December  2012   800   296   121   229  0.528    36    86   0.419    95
#>  9 Duke  December  2013  1000   361   157   316  0.497    44    94   0.468    74
#> 10 Duke  December  2014  1000   342   143   302  0.474    48   125   0.384    78
#> # … with 68 more rows, and 28 more variables: fta <dbl>, ft_pct <dbl>,
#> #   oreb <dbl>, dreb <dbl>, reb <dbl>, ast <dbl>, stl <dbl>, blk <dbl>,
#> #   to <dbl>, pf <dbl>, pts <int>, second_chance_pts <dbl>,
#> #   second_chance_fgm <dbl>, second_chance_fga <dbl>,
#> #   second_change_fg_pct <dbl>, pts_in_paint <dbl>, pts_in_paint_fgm <dbl>,
#> #   pts_in_paint_fga <dbl>, pts_in_paint_fg_pct <dbl>, fast_brk_pts <dbl>,
#> #   fast_brk_fgm <dbl>, fast_brk_fga <dbl>, fast_brk_fg_pct <dbl>, …