# Load packages
library(data.table)
library(dplyr)
library(kableExtra)

# Creating data
year <- c(2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 
          2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019)
white <- c("Alex", "Weese", "Weese", "Jerry", "Weese", "Jerry", "Alex", "Matt", "Alex", "Matt", "Matt", "Jerry", 
           "Alex", "Weese", "Weese", "Matt", "Matt", "Weese", "Alex", "Matt", "Alex", "Jery", "Alex", "Jerry")
black <- c("Matt", "Jerry", "Alex", "Matt", "Matt", "Alex", "Jerry", "Weese", "Weese", "Jerry", "Alex", "Weese", 
           "Jerry", "Matt", "Alex", "Jerry", "Alex", "Jerry", "Jerry", "Weese", "Weese", "Matt", "Matt", "Weese")
winner <- c("Matt", "Weese", "Alex", "Jerry", "Weese", "Alex", "Alex", "Weese", "Alex", "Jerry", "Alex", "Weese", 
            "Alex", "Weese", "Alex", "Matt", "Alex", "Jerry", "Alex", "Weese", "Alex", "Jerry", "Alex", "Jerry")
loser <- c("Alex", "Jerry", "Weese", "Matt", "Matt", "Jerry", "Jerry", "Matt", "Weese", "Matt", "Matt", "Jerry", 
           "Jerry", "Matt", "Weese", "Jerry", "Matt", "Weese", "Jerry", "Matt", "Weese", "Matt", "Matt", "Weese")
round <- c(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6)

results <- data.table(year, round, white, black, winner, loser)



2018 DCT Results


Here are the standings as a whole:

data = data.table(tibble::tribble(~Players, ~Alex,  ~Weese,  ~Jerry,  ~Matt, ~`Total Points`,
                                  "Alex",   "0-0",  "2-0",   "2-0",   "1-1", 5,
                                  "Weese",  "0-2",  "0-0",   "2-0",   "2-0", 4,
                                  "Jerry",  "0-2",  "0-2",   "0-0",   "2-0", 2,
                                  "Matt",   "1-1",  "0-2",   "0-2",   "0-0", 1))

data %>%
  kable(format = "html", escape = F) %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  column_spec(c(6), bold=T) %>%
  row_spec(0, bold = T, color = "white", background = "#002800") %>%
  add_header_above(c("2018 Drunk Chess Results" =6))
2018 Drunk Chess Results
Players Alex Weese Jerry Matt Total Points
Alex 0-0 2-0 2-0 1-1 5
Weese 0-2 0-0 2-0 2-0 4
Jerry 0-2 0-2 0-0 2-0 2
Matt 1-1 0-2 0-2 0-0 1


Let’s take a look at how the tournament unfolded

library(formattable)
data.table(Players = c("Alex", "Weese", "Jerry", "Matt"),
           `Round 1` = c("White vs Matt", "White vs Jerry", "Black vs Weese", "Black vs Alex"),
           `Round 2` = c("Black vs Weese", "White vs Alex", "White vs Matt", "Black vs Jerry"),
           `Round 3` = c("Black vs Jerry", "White vs Matt", "White vs Alex", "Black vs Weese"),
           `Round 4` = c("White vs Jerry", "Black vs Matt", "Black vs Alex", "White vs Weese"),
           `Round 5` = c("White vs Weese", "Black vs Alex", "Black vs Matt", "White vs Jerry"),
           `Round 6` = c("Black vs Matt", "Black vs Jerry", "White vs Weese", "White vs Alex"),
           `Total Points` = c(5, 4, 2, 1)) %>%
  kable("html",table.attr = "class='dtable'") %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  column_spec(c(8), bold=T) %>%
  row_spec(0, bold = T, color = "white", background = "#002800") %>%
  add_header_above(c("2018 Drunk Chess Round by Round" =8))
2018 Drunk Chess Round by Round
Players Round 1 Round 2 Round 3 Round 4 Round 5 Round 6 Total Points
Alex White vs Matt Black vs Weese Black vs Jerry White vs Jerry White vs Weese Black vs Matt 5
Weese White vs Jerry White vs Alex White vs Matt Black vs Matt Black vs Alex Black vs Jerry 4
Jerry Black vs Weese White vs Matt White vs Alex Black vs Alex Black vs Matt White vs Weese 2
Matt Black vs Alex Black vs Jerry Black vs Weese White vs Weese White vs Jerry White vs Alex 1


How comfortable was it?

library(formattable)
data.table(Players = c("Alex", "Weese", "Jerry", "Matt", "Spring Hill", "Douglass"),
           `Round 1` = c(0, 1, 0, 1, 0, 2),
           `Round 2` = c(1, 1, 1, 1, 2, 2),
           `Round 3` = c(2, 2, 1, 1, 2, 2),
           `Round 4` = c(3, 3, 1, 1, 2, 2),
           `Round 5` = c(4, 3, 2, 1, 4, 2),
           `Round 6` = c(5, 4, 2, 1, 5, 3),
           `Total Points` = c(5, 4, 2, 1, 5, 3)) %>%
  kable("html",table.attr = "class='dtable'") %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  column_spec(c(8), bold=T) %>%
  row_spec(0, bold = T, color = "white", background = "#002800") %>%
  add_header_above(c("2018 Drunk Chess Round by Round" =8))
2018 Drunk Chess Round by Round
Players Round 1 Round 2 Round 3 Round 4 Round 5 Round 6 Total Points
Alex 0 1 2 3 4 5 5
Weese 1 1 2 3 3 4 4
Jerry 0 1 1 1 2 2 2
Matt 1 1 1 1 1 1 1
Spring Hill 0 2 2 2 4 5 5
Douglass 2 2 2 2 2 3 3



2019 DCT Results


Here are the standings as a whole:

data = data.table(tibble::tribble(~Players, ~Alex,  ~Jerry,  ~Weese,  ~Matt, ~`Total Points`,
                                  "Alex",   "0-0",  "2-0",   "2-0",   "2-0", 6,
                                  "Jerry",  "0-2",  "0-0",   "2-0",   "1-1", 3,
                                  "Weese",  "0-2",  "0-2",   "0-0",   "2-0", 2,
                                  "Matt",   "0-2",  "1-1",   "0-2",   "0-0", 1))

data %>%
  kable(format = "html", escape = F) %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  column_spec(c(6), bold=T) %>%
  row_spec(0, bold = T, color = "white", background = "#000034") %>%
  add_header_above(c("2019 Drunk Chess Results" =6))
2019 Drunk Chess Results
Players Alex Jerry Weese Matt Total Points
Alex 0-0 2-0 2-0 2-0 6
Jerry 0-2 0-0 2-0 1-1 3
Weese 0-2 0-2 0-0 2-0 2
Matt 0-2 1-1 0-2 0-0 1


Let’s take a look at how the tournament unfolded

library(formattable)
data.table(Players = c("Alex",             "Jerry",          "Weese",          "Matt"),
           `Round 1` = c("White vs Jerry", "Black vs Alex",  "White vs Matt",  "Black vs Weese"),
           `Round 2` = c("Black vs Weese", "Black vs Matt",  "White vs Alex",  "White vs Jerry"),
           `Round 3` = c("Black vs Matt",  "Black vs Weese", "White vs Jerry", "White vs Alex"),
           `Round 4` = c("Black vs Jerry", "White vs Alex",  "Black vs Matt",  "White vs Weese"),
           `Round 5` = c("White vs Weese", "White vs Matt",  "Black vs Alex",  "Black vs Jerry"),
           `Round 6` = c("White vs Matt",  "White vs Weese", "Black vs Jerry", "Black vs Alex"),
           `Total Points` = c(6, 3, 2, 1)) %>%
  kable("html",table.attr = "class='dtable'") %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  column_spec(c(8), bold=T) %>%
  row_spec(0, bold = T, color = "white", background = "#000034") %>%
  add_header_above(c("2019 Drunk Chess Round by Round" =8))
2019 Drunk Chess Round by Round
Players Round 1 Round 2 Round 3 Round 4 Round 5 Round 6 Total Points
Alex White vs Jerry Black vs Weese Black vs Matt Black vs Jerry White vs Weese White vs Matt 6
Jerry Black vs Alex Black vs Matt Black vs Weese White vs Alex White vs Matt White vs Weese 3
Weese White vs Matt White vs Alex White vs Jerry Black vs Matt Black vs Alex Black vs Jerry 2
Matt Black vs Weese White vs Jerry White vs Alex White vs Weese Black vs Jerry Black vs Alex 1


How comfortable was it?

library(formattable)
data.table(Players = c("Alex", "Jerry", "Weese", "Matt", "Spring Hill", "Douglass"),
           `Round 1` = c(1,    0,       1,       0,      0,             0),
           `Round 2` = c(2,    0,       1,       1,      1,             1),
           `Round 3` = c(3,    1,       1,       1,      3,             1),
           `Round 4` = c(4,    1,       2,       1,      3,             1),
           `Round 5` = c(5,    2,       2,       1,      5,             1),
           `Round 6` = c(6,    3,       2,       1,      7,             1),
           `Total Points` = c(6, 3, 2, 1, 7, 1)) %>%
  kable("html",table.attr = "class='dtable'") %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  column_spec(c(8), bold=T) %>%
  row_spec(0, bold = T, color = "white", background = "#000034") %>%
  add_header_above(c("2019 Drunk Chess Round by Round" =8))
2019 Drunk Chess Round by Round
Players Round 1 Round 2 Round 3 Round 4 Round 5 Round 6 Total Points
Alex 1 2 3 4 5 6 6
Jerry 0 0 1 1 2 3 3
Weese 1 1 1 2 2 2 2
Matt 0 1 1 1 1 1 1
Spring Hill 0 1 3 3 5 7 7
Douglass 0 1 1 1 1 1 1



Overall DCT Results


Here are the standings as a whole:

data = data.table(tibble::tribble(~Players, ~Alex,  ~Weese,  ~Jerry,  ~Matt, ~`Total Points`,
                                  "Alex",   "0-0",  "4-0",   "4-0",   "3-1", 11,
                                  "Weese",  "0-4",  "0-0",   "2-2",   "4-0", 6,
                                  "Jerry",  "0-4",  "2-2",   "0-0",   "3-1", 5,
                                  "Matt",   "1-3",  "0-4",   "1-3",   "0-0", 2))

data %>%
  kable(format = "html", escape = F) %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  column_spec(c(6), bold=T) %>%
  row_spec(0, bold = T, color = "white", background = "#660000") %>%
  add_header_above(c("Overall Drunk Chess Results" =6))
Overall Drunk Chess Results
Players Alex Weese Jerry Matt Total Points
Alex 0-0 4-0 4-0 3-1 11
Weese 0-4 0-0 2-2 4-0 6
Jerry 0-4 2-2 0-0 3-1 5
Matt 1-3 0-4 1-3 0-0 2


Status of the Spring Hill vs Douglass

data = data.table(tibble::tribble(~`Spring Hill`, ~Douglass,
                                  12,             4))

data %>%
  kable(format = "html", escape = F) %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  row_spec(0, bold = T, color = "white", background = "#660000") %>%
  add_header_above(c("Battle of the Cities" =2))
Battle of the Cities
Spring Hill Douglass
12 4


Winning Streaks

data = data.table(tibble::tribble(~`Player`, ~Current, ~Longest, 
                                  "Alex",    11,       11, 
                                  "Jerry",   2,        2,
                                  "Weese",   0,        2,
                                  "Matt",    0,        1))

data %>%
  kable(format = "html", escape = F) %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  row_spec(0, bold = T, color = "white", background = "#660000") %>%
  add_header_above(c("Winning Streaks" =3))
Winning Streaks
Player Current Longest
Alex 11 11
Jerry 2 2
Weese 0 2
Matt 0 1


Wins by Color

data = data.table(tibble::tribble(~`Player`, ~White,  ~Black, 
                                  "Alex",    5,       6, 
                                  "Weese",   3,       3,
                                  "Jerry",   3,       2,
                                  "Matt",    1,       1))

data %>%
  kable(format = "html", escape = F) %>%
  kable_styling("striped", full_width = F, position = "center") %>%
  row_spec(0, bold = T, color = "white", background = "#660000") %>%
  add_header_above(c("Wins by Color" =3))
Wins by Color
Player White Black
Alex 5 6
Weese 3 3
Jerry 3 2
Matt 1 1