Code
library(rlang)
library(cbbplotR)
ncaa <- readr::read_csv("ncaa-brack.csv")May 27, 2025
ncaa_header <- glue::glue(
"<div style='display: flex; justify-content: space-between; align-items: center;'>
<div>
<img src='https://a3.espncdn.com/combiner/i?img=%2Fredesign%2Fassets%2Fimg%2Ficons%2FESPN%2Dicon%2Dbaseball.png'
style='height: 40px; width: auto; vertical-align: middle;'>
</div>
<div style='flex-grow:1; margin-left: 30px; margin-right: 30px'>
<span style='display: block; font-weight: bold; text-align: center; font-size: 24px;'>2025 <s>NCAA Baseball Tournament</s><br> SEC-ACC Invitational</span>
<span style='font-size: 14px; font-weight: normal; display: block; text-align: center;'>
Squares represent a <span style='color: #FBCE28; font-weight: bolder;'>SEC team</span> or <span style='color: #013CA6; font-weight: bolder;'>ACC team</span><br> 22 of 64 teams in the field are from these two conferences.
</span>
</div>
<div>
<img src='https://a3.espncdn.com/combiner/i?img=%2Fredesign%2Fassets%2Fimg%2Ficons%2FESPN%2Dicon%2Dbaseball.png'
style='height: 40px; width: auto; vertical-align: middle;'>
</div>
</div>
<br>"
)
ncaa |>
cbbplotR::gt_cbb_teams(host_left, host_left, logo_height = 12) |>
cbbplotR::gt_cbb_teams(host_right, host_right, logo_height = 12) |>
dplyr::mutate(seed_host_left = paste0(seed_left, " - ", host_left)) |>
dplyr::mutate(seed_host_right = paste0(seed_right, " - ", host_right)) |>
gt::gt() |>
gtUtils::gt_theme_savant() |>
gt::cols_hide(columns = c(seed_left, seed_right, host_left, host_right)) |>
gt::fmt_markdown(columns = c(seed_host_left, seed_host_right)) |>
gtExtras::gt_merge_stack(
col1 = regional_left,
col2 = seed_host_left,
palette = c("black", "#333333")
) |>
gtExtras::gt_merge_stack(
col1 = regional_right,
col2 = seed_host_right,
palette = c("black", "#333333")
) |>
gt::cols_align(columns = c(host_left, host_right), align = "left") |>
gtUtils::gt_indicator_boxes(
key_columns = c("regional_left", "seed_left", "seed_right", "regional_right"),
color_yes = "#FBCE28",
color_no = "#013CA6",
color_na = "#e1e1e1",
border_color = "black",
border_width = 0.5
) |>
gtUtils::gt_column_subheaders(
seed_left = list(heading = "Seed", subtitle = "Overall"),
regional_left = list(heading = "Regional", subtitle = "Seed & Host"),
seed_right = list(heading = "Seed", subtitle = "Overall"),
regional_right = list(heading = "Regional", subtitle = "Seed & Host"),
heading_color = "black",
subtitle_color = "gray"
) |>
gt::tab_spanner(columns = c(team_1, team_2, team_3, team_4),
label = "Seeds") |>
gt::tab_spanner(columns = c(team_5, team_6, team_7, team_8),
label = "Seeds ") |>
gt::cols_label(
team_1 = "1",
team_2 = "2",
team_3 = "3",
team_4 = "4",
team_5 = "1",
team_6 = "2",
team_7 = "3",
team_8 = "4",
) |>
gt::tab_header(title = gt::html(ncaa_header)) |>
gtUtils::gt_border_grid(color = "black",
weight = 1,
include_labels = FALSE) |>
gt::tab_source_note(
source_note = gt::html(
"<hr>Four SEC and four ACC schools advanced to the 2024 College World Series<br>
These two conferences make up 11 of the 16 Regional Hosts: SEC (8) and ACC (3)<br>
<hr><b>Table by Chris at Bless your chart | data via ncaa.org | May 27, 2025</b>"
)
) |>
gtUtils::gt_border_bars_bottom(c("#FBCE28", "#013CA6", "#e1e1e1")) |>
gt::tab_style(
locations = gt::cells_source_notes(),
style = gt::cell_text(
font = gt::google_font("Roboto Condensed"),
size = gt::px(11.5),
color = "black",
weight = 250
)
) |>
gt::tab_style(
style = list(gt::cell_text(
font = gt::google_font("Roboto Condensed"),
size = gt::px(14)
)),
locations = gt::cells_body(
rows = gt::everything(),
columns = gt::everything()
)
) |>
gt::tab_options(table.width = gt::px(675)) -> ncaa_tbl
gtUtils::gt_save_crop(ncaa_tbl,
file = "ncaa_tbl.png",
whitespace = 40,
bg = "white")
ncaa_tbl
2025
SEC-ACC Invitational Squares represent a SEC team or ACC team 22 of 64 teams in the field are from these two conferences. |
|||||||||
|---|---|---|---|---|---|---|---|---|---|
Regional Seed & Host |
Seeds
|
Regional Seed & Host |
Seeds
|
||||||
| 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | ||
Nashville
1 - Vanderbilt
|
Austin
2 - Texas
|
||||||||
Hattiesburg
16 - Southern Miss
|
Los Angeles
15 - UCLA
|
||||||||
Corvallis
8 - Oregon St.
|
Athens
7 - Georgia
|
||||||||
Tallahassee
9 - Florida St.
|
Oxford
10 - Mississippi
|
||||||||
Chapel Hill
5 - North Carolina
|
Baton Rouge
6 - LSU
|
||||||||
Eugene
12 - Oregon
|
Clemson
11 - Clemson
|
||||||||
Auburn
4 - Auburn
|
Fayetteville
3 - Arkansas
|
||||||||
Conway
13 - Coastal Carolina
|
Knoxville
14 - Tennessee
|
||||||||
Four SEC and four ACC schools advanced to the 2024 College World Series These two conferences make up 11 of the 16 Regional Hosts: SEC (8) and ACC (3) Table by Chris at Bless your chart | data via ncaa.org | May 27, 2025 |
|||||||||
knapp <- tibble::tribble(
~ result,
~ opp,
~ innings,
~ pitch_count,
~ bf,
"-",
"Texas Tech",
3,
46,
11,
"-",
"East Carolina",
3,
73,
14,
"W",
"Stony Brook",
5,
93,
23,
"W",
"Stanford",
7,
111,
26,
"W",
"Louisville",
7,
107,
28,
"W",
"Boston College",
6.2,
85,
24,
"W",
"Miami",
7,
115,
26,
"W",
"Duke",
7,
112,
28,
"W",
"Wake Forest",
5.2,
116,
24,
"W",
"Virginia Tech",
5.1,
101,
23,
"W",
"Pittsburgh",
6.1,
103,
25,
"W",
"NC State",
8,
107,
28,
"W",
"Florida State",
9,
115,
31,
"W",
"Boston College",
7,
83,
25
)
kp_wide <- knapp |>
dplyr::rowwise() |>
dplyr::mutate(inn_split = list({
full <- floor(innings)
partial <- innings - full
split <- c(rep(1, full), partial)
length(split) <- 9
split[is.na(split)] <- 0
split
})) |>
tidyr::unnest_wider(inn_split, names_sep = "_") |>
dplyr::rename_with(
.fn = ~ paste0("inn_", seq_along(.)),
.cols = dplyr::starts_with("inn_split")
) |>
dplyr::ungroup() |>
dplyr::mutate(
inn_6 = dplyr::if_else(!inn_6 %in% c(0 | 1), 0.5, inn_6),
inn_7 = dplyr::if_else(!inn_7 %in% c(0 | 1), 0.5, inn_7)
)
# add custom header
knapp_header <- glue::glue(
"<div style='display: flex; justify-content: space-between; align-items: center;'>
<div>
<img src='https://a3.espncdn.com/combiner/i?img=%2Fredesign%2Fassets%2Fimg%2Ficons%2FESPN%2Dicon%2Dbaseball.png'
style='height: 40px; width: auto; vertical-align: middle;'>
</div>
<div style='flex-grow:1; margin-left: 30px; margin-right: 30px'>
<span style='display: block; font-weight: bold; text-align: center; font-size: 24px;'>Jake Knapp Pitching Log</span>
<span style='font-size: 14px; font-weight: normal; display: block; text-align: center;'>Knapp was named the 2025 ACC Pitcher of the Year.</span>
</div>
<div>
<img src='https://a.espncdn.com/combiner/i?img=/i/teamlogos/ncaa/500/153.png'
style='height: 60px; width: auto; vertical-align: middle;'>
</div>
</div>
<br>"
)
kp_tbl <- kp_wide |>
cbbplotR::gt_cbb_teams(opp, opp, logo_height = 15) |>
dplyr::select(
opp,
result,
inn_1,
inn_2,
inn_3,
inn_4,
inn_5,
inn_6,
inn_7,
inn_8,
inn_9,
innings,
pitch_count,
bf
) |>
gt::gt() |>
gtUtils::gt_theme_savant() |>
gt::cols_align(opp, align = "left") |>
gtUtils::gt_indicator_boxes(
key_columns = c("result", "opp", "innings", "pitch_count", "bf"),
color_yes = "#56a0d3",
color_na = "#e1e1e1"
) |>
gt::fmt_markdown(opp) |>
gt::rows_add(
result = "12-0",
opp = "TOTALS",
innings = 87,
pitch_count = 1367,
bf = 336
) |>
gt::sub_missing(rows = gt::everything(), missing_text = "---") |>
gtUtils::gt_column_subheaders(
result = list(heading = "Result", subtitle = "W/L/-"),
innings = list(heading = "Innings", subtitle = "Pitched"),
pitch_count = list(heading = "Pitch", subtitle = "Count"),
bf = list(heading = "Batters", subtitle = "Faced"),
heading_color = "black",
subtitle_color = "gray"
) |>
gt::tab_spanner(columns = gt::starts_with("inn_"), label = "Innings") |>
gt::cols_label(opp = "Opponent", !!!rlang::set_names(as.character(1:9), paste0("inn_", 1:9))) |>
gt::tab_header(title = gt::html(knapp_header)) |>
gt::tab_source_note(
source_note = gt::html(
"<hr>Knapp is one of the most efficient pitchers in the country with a 0.83 WHIP in 87 innings (13 walks to 59 hits allowed)<br>
Knapp has thrown at least 7 innings in his last 3 starts and earned the win in each of those appearances<br>On average, Knapp throws ~16 pitches per inning and faces ~4 batters per inning<br>
<hr><b>Table by Chris at Bless your chart | data via ncaa.org through
May 25 games</b>"
)
) |>
gtUtils::gt_border_bars_bottom(c("#56a0d3", "#89BDE0", "#BBD9ED")) |>
gtExtras::gt_highlight_rows(
columns = c(result),
rows = c(3:14),
fill = "#BBD9ED"
) |>
gt::cols_align(result, align = "center") |>
gtExtras::gt_highlight_rows(rows = c(15), fill = "#fffec8") |>
gt::tab_style(
locations = gt::cells_source_notes(),
style = gt::cell_text(
font = gt::google_font("Roboto Condensed"),
size = gt::px(11.5),
weight = 450
)
) |>
gt::tab_style(
style = list(gt::cell_text(
font = gt::google_font("Roboto Condensed"),
size = gt::px(14)
)),
locations = gt::cells_body(
rows = gt::everything(),
columns = gt::everything()
)
) |>
gtUtils::gt_border_grid(color = "black",
weight = 1,
include_labels = FALSE) |>
gt::tab_options(table.width = gt::px(675))
gtUtils::gt_save_crop(
kp_tbl,
file = "kp_tbl.png",
whitespace = 40,
bg = "white"
)
kp_tbl
Jake Knapp Pitching Log Knapp was named the 2025 ACC Pitcher of the Year.
|
|||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Opponent |
Result W/L/- |
Innings
|
Innings Pitched |
Pitch Count |
Batters Faced |
||||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |||||
Texas Tech |
- | 3.0 | 46 | 11 | |||||||||
East Carolina |
- | 3.0 | 73 | 14 | |||||||||
Stony Brook |
W | 5.0 | 93 | 23 | |||||||||
Stanford |
W | 7.0 | 111 | 26 | |||||||||
Louisville |
W | 7.0 | 107 | 28 | |||||||||
Boston College |
W | 6.2 | 85 | 24 | |||||||||
Miami FL |
W | 7.0 | 115 | 26 | |||||||||
Duke |
W | 7.0 | 112 | 28 | |||||||||
Wake Forest |
W | 5.2 | 116 | 24 | |||||||||
Virginia Tech |
W | 5.1 | 101 | 23 | |||||||||
Pittsburgh |
W | 6.1 | 103 | 25 | |||||||||
North Carolina St. |
W | 8.0 | 107 | 28 | |||||||||
Florida St. |
W | 9.0 | 115 | 31 | |||||||||
Boston College |
W | 7.0 | 83 | 25 | |||||||||
| TOTALS | 12-0 | — | — | — | — | — | — | — | — | — | 87.0 | 1367 | 336 |
Knapp is one of the most efficient pitchers in the country with a 0.83 WHIP in 87 innings (13 walks to 59 hits allowed) Knapp has thrown at least 7 innings in his last 3 starts and earned the win in each of those appearances On average, Knapp throws ~16 pitches per inning and faces ~4 batters per inning Table by Chris at Bless your chart | data via ncaa.org through May 25 games |
|||||||||||||