gt - a (G)rammar of (T)ables

NFL tidyverse tables

Not to be confused with a Game of Thrones

Thomas Mock
Preview of the table to come

gt package - a (g)rammar of (t)ables

gt is an R package for generating formatted tables from dataframes in R with a Grammar of Tables.

If you want to go deeper than this basic guide, check out the gt site, which has lots of examples!

Raw data comes from: Pro Football Reference & Over the Cap

Component parts of a gt table

Per the package website, gt has the following component parts:

The parts (roughly from top to bottom) are:

As you can see it is fleshing out the idea of formatting or adding various parts of the table in a robust way.

Read in the Data

I’ve gone through collecting the data and have put into a non-tidy wide format for Salary Rank, playoff week and appearances, Total appearances, and finally salary from 2014-2019.

library(gt) # for static tables
library(tidyverse) # all the things
library(paletteer) # for all the palettes

playoff_salary <- read_csv("")