Chapter 11 Using a Database to Compute Park Factors

Learning objectives:

  • Installing and creating a MySQL database
  • Create a MySQL Game Log database
  • Querying the database from R
  • Building your own baseball database
  • Park factors
suppressMessages(library(tidyverse))
# library(RPostgres) # using PostgreSQL instead of MariaDB
library(baseballr)
library(ggstatsplot)
theme_set(theme_classic())

crcblue <- "#2905a1"

crc_fc <- c("#2905a1", "#e41a1c", "#4daf4a", "#984ea3")

options(digits = 3)