ncaab_tbl <-function(bracket) {# Set the title of the plot table_title <-"College World Series: Regionals by the Numbers" bm |> dplyr::filter(bracket == { { bracket } }) |> dplyr::arrange(seed, super) |> dplyr::relocate(prob, .before =`DSR Rank`) |> gt::gt(groupname_col ="regional") |> gtExtras::gt_img_rows(columns = logo, img_source ="web", height =30) |> gt::cols_hide(columns =c(bracket, super)) |> gt::cols_label(seed ="",logo ="",team_name ="",`W-L-T`="Record",WPCT ="Win %",prob ="Odds",`DSR Rank`="DSR",rpi ="RPI",wab_rank ="WAB", ) |>gt_theme_chris() |> gt::tab_spanner(label ="Rankings", columns =c(`DSR Rank`, wab_rank, rpi)) |> gt::cols_align(align ="left", columns =c(logo, team_name)) |> gtExtras::gt_hulk_col_numeric(columns =c(`DSR Rank`, wab_rank, rpi),reverse =TRUE) |> gtExtras::gt_hulk_col_numeric(columns =c(prob)) |> gt::fmt_percent(columns =c(prob), decimals =1) |> gtExtras::gt_add_divider(columns =c(WPCT, prob), sides ="right", color ="black") |> gt::tab_header(title = table_title,subtitle = gt::html("Regionals grouped by national seeds. Data inclues overall record, win percentage, odds to win regional, and numerical rankings across various D-I metrics.")) |> gt::tab_source_note(source_note = gt::html("<hr><br> Odds to win regional from DraftKings<br> DSR is the Diamond Sports Ranking computed by 643charts.com<br> RPI is from the stats.ncaa.org<br> WAB is wins-above-bubble computed by Seth Burn<br> <hr> <b>Table by Chris (@dadgumboxscores) + Bless your chart | | May 30, 2024</b>")) |> gt::tab_style(style = gt::cell_borders(sides ="top", color ='black', weight = gt::px(1.5), style ='solid'),locations = gt::cells_body(rows = gt::everything() ) ) -> ncaabt_table ncaabt_table} ncaab_tbl(bracket ="one") -> tbl_onencaab_tbl(bracket ="two") -> tbl_twoncaab_tbl(bracket ="three") -> tbl_threencaab_tbl(bracket ="four") -> tbl_fourgtExtras::gtsave_extra(tbl_one,filename ="nccat_tbl_one.png",vheight =1200,vwidth =750)gtExtras::gtsave_extra(tbl_two,filename ="nccat_tbl_twos.png",vheight =1200,vwidth =750)gtExtras::gtsave_extra(tbl_three,filename ="nccat_tbl_three.png",vheight =1200,vwidth =750)gtExtras::gtsave_extra(tbl_four,filename ="nccat_tbl_four.png",vheight =1200,vwidth =750)# example!tbl_one
College World Series: Regionals by the Numbers
Regionals grouped by national seeds. Data inclues overall record, win percentage, odds to win regional, and numerical rankings across various D-I metrics.
Record
Win %
Odds
Rankings
DSR
WAB
RPI
Tucson Regional
1
Arizona
36-21-0
0.632
36.4%
36
24
31
2
Dallas Baptist
44-13-0
0.772
36.4%
24
25
17
3
West Virginia
33-22-0
0.600
23.3%
41
35
37
4
Grand Canyon
34-23-0
0.596
13.3%
93
82
96
Chapel Hill Regional
1
North Carolina
42-13-0
0.764
52.4%
2
4
4
2
LSU
40-21-0
0.656
47.6%
10
19
23
3
Wofford
41-18-0
0.695
10.0%
50
69
46
4
Long Island
33-23-0
0.589
1.0%
187
188
195
Fayetteville Regional
1
Arkansas
43-14-0
0.754
65.5%
6
5
5
2
Louisiana Tech
44-17-0
0.721
18.2%
33
41
29
3
Kansas State
32-24-0
0.571
22.2%
66
40
45
4
Southeast Missouri
34-25-0
0.576
3.8%
106
159
132
Charlottesville Regional
1
Virginia
41-15-0
0.732
54.5%
9
11
12
2
Mississippi State
38-21-0
0.644
43.5%
17
21
25
3
St. John's
37-16-1
0.694
7.1%
73
64
51
4
Penn
24-23-0
0.511
3.8%
161
167
180
Odds to win regional from DraftKings
DSR is the Diamond Sports Ranking computed by 643charts.com
RPI is from the stats.ncaa.org
WAB is wins-above-bubble computed by Seth Burn Table by Chris (@dadgumboxscores) + Bless your chart | | May 30, 2024