Skip to contents

DM Sans throughout in the Premier League's deep purple (#37003c), with muted-purple column labels and a purple rule bracketing the body. Row groups render as white labels on a pale lilac fill, and column spanners are bold and underlined.

Usage

gt_theme_pl(gt_object, density = c("comfortable", "compact", "social"), ...)

Arguments

gt_object

A gt table object to modify.

density

Character. The type and padding scale. One of "comfortable", "compact", or "social". See Density. Defaults to "comfortable".

...

Additional arguments passed to gt::tab_options, applied last so they override anything the theme sets.

Value

Returns a modified gt table with the theme applied.

Details

A purple rule closes the column labels and another opens the body, and each body row is separated by a purple bottom border. The last body row's bottom border is painted white so it does not double the rule that closes the table.

Density

density scales the theme's type and row padding together. "comfortable" leaves every size as the theme sets it, "compact" scales both down, and "social" scales both up, to the scale gt_save_crop() and gt_social_crop() export at.

Figures

Preview of the Premier League theme

Examples

library(gt)
southeast <- subset(
  sdv_example_standings, division == "Southeast",
  c(team_name, wins, losses, win_pct:points_against)
)
gt(southeast) |> gt_theme_pl()
team_name wins losses win_pct points_for points_against
Atlanta Hawks 46 36 0.561 9714 9516
Orlando Magic 45 37 0.549 9491 9439
Charlotte Hornets 44 38 0.537 9513 9117
Miami Heat 43 39 0.524 9911 9720
Washington Wizards 17 65 0.207 9258 10240