Skip to contents

Logos, Wordmarks & Headshots

ggplot2 geoms and ggproto objects for rendering team logos, wordmarks and player headshots on plots. Every geom takes a sport argument.

geom_sdv_logos() GeomSDVlogo
ggplot2 Layer for Visualizing Sports Team Logos
geom_sdv_wordmarks() GeomSDVwordmark
ggplot2 Layer for Visualizing Sports Team Wordmarks
geom_sdv_headshots() GeomSDVheadshot
ggplot2 Layer for Visualizing Player Headshots

Theme Elements

Image-based ggplot2 theme elements for axis text — replace tick labels with team logos, wordmarks or player headshots.

Scales & Axes

Team color / fill scales, logo and headshot axis scales, and the matching theme helpers.

scale_color_sdv() scale_colour_sdv() scale_fill_sdv()
Scales for Sports Team Colors
scale_x_sdv() scale_y_sdv() scale_x_sdv_headshots() scale_y_sdv_headshots()
Axis Scales for Sports Team Logos
theme_x_sdv() theme_y_sdv()
Theme Helpers for SDV Axis Labels

gt Table Helpers

Embed team logos, wordmarks and player headshots inside gt table cells or column labels, and stack team-colored text.

gt_sdv_logos()
Render Logos in 'gt' Tables
gt_sdv_wordmarks()
Render Wordmarks in 'gt' Tables
gt_sdv_headshots()
Render Player Headshots in 'gt' Tables
gt_sdv_cols_label()
Render Logos in 'gt' Table Column Labels
gt_merge_stack_team_color()
Merge and Stack Text in gt Tables with Team Colors

SportsDataverse Table Themes

The SportsDataverse house table, in light and dark, and a version dressed in any team’s colors.

gt_theme_sdv()
SportsDataverse theme for gt tables
gt_theme_sdv_team()
Team-colored SportsDataverse theme for gt tables

gt Table Themes

Editorial and broadcast-style themes for gt tables, ported from gtUtils. theme_bg holds each theme’s background color for matching a saved image’s canvas.

gt_theme_almanac()
Record-book theme for gt tables
gt_theme_athletic()
The Athletic theme for gt tables
gt_theme_booktabs()
Academic booktabs theme for gt tables
gt_theme_broadsheet()
Editorial serif theme for gt tables
gt_theme_brutalist()
Heavy-rule display theme for gt tables
gt_theme_drench()
Saturated single-color theme for gt tables
gt_theme_gtutils()
gtUtils theme for gt tables
gt_theme_kenpom()
KenPom theme for gt tables
gt_theme_midnight()
Dark theme for gt tables
gt_theme_ncaa()
NCAA theme for gt tables
gt_theme_pl()
Premier League theme for gt tables
gt_theme_savant()
Baseball Savant theme for gt tables
gt_theme_scoreboard()
Broadcast-graphics theme for gt tables
gt_theme_sofa()
SofaScore theme for gt tables
gt_theme_swiss()
International Typographic Style theme for gt tables
gt_theme_terminal()
Data-terminal theme for gt tables
gt_theme_tier()
Tier list theme for gt tables
gt_theme_tufte()
Minimal-ink theme for gt tables
gt_theme_preview()
Preview data in every theme
pal_midnight
A rank palette for dark backgrounds
theme_bg
Background colors used by the gt_theme_*() table themes

gt Table Annotations

Captions, headers, cut lines, marginalia, watermarks and social tags.

gt_538_caption()
Add a 538-style caption to a gt table
gt_cutline()
Draw a labeled cut line between rows of a gt table
gt_marginalia()
Style a column as margin notes
gt_column_subheaders()
Add stacked column headers with subtitles to a gt table
gt_social_tag()
Add social handles to a gt table
gt_title_header()
Build a styled header block for a gt table
gt_watermark()
Put a watermark behind a gt table

gt Table Coloring

Legends, color pills, percentile bars, rank and result colors, highlights.

gt_legend_continuous()
Add a color legend to a gt table
gt_legend_discrete()
Add a discrete color key to a gt table
gt_color_pills()
Add color pills to gt table columns
gt_percentile_bar()
Draw percentile bars in a gt table
gt_row_accent()
Put a colored bar on the leading edge of each row
gt_color_ranks()
Color ranked columns of a gt table
gt_color_results()
Color rows of a gt table by win, loss, or tie result
gt_group_stripes()
Band alternate row groups of a gt table
gt_highlight_cells()
Fill individual cells in a gt table by a condition
gt_highlight_na()
Style and relabel missing values in a gt table
gt_outliers()
Flag outlying values in a gt table
gt_indicator_boxes()
Add colored indicator boxes to a gt table
gt_spotlight()
Focus on rows of a gt table by dimming the rest

gt Table Formatting

Borders, deltas, rank and tally formats, significance, fonts, tiers.

gt_bold_rows()
Bold rows in a gt table
gt_border_bars_bottom()
Add horizontal bars to the bottom of a gt table
gt_border_bars_top()
Add horizontal bars to the top of a gt table
gt_border_grid()
Add a border grid to a gt table
gt_delta()
Add a computed change column to a gt table
gt_fmt_rank()
Format numbers as ordinals in a gt table
gt_fmt_tally()
Combine count columns into a single cell in a gt table
gt_scale_note()
Scale columns and disclose the scaling
gt_significance()
Add significance stars to a gt table
gt_set_font()
Set one font family across a whole gt table
gt_tiers()
Color and bold the tier column of a gt table
gt_wrap_labels()
Break long column labels across lines in a gt table

gt Table Layout

Arrange several tables, or one long table, into a single graphic.

gt_grid()
Arrange several gt tables in a grid
gt_snake()
Lay a long table out in side-by-side blocks
gt_snake_align()
Reshape a parallel frame to match a snaked table
gt_stack_tables()
Stack several gt tables vertically

Saving gt Tables

Save, crop and pad tables for publication or social media.

gt_save_batch()
Save a matched set of images, one per group
gt_save_crop()
Save a gt table to an image and trim its whitespace
gt_social_crop()
Save a gt table onto a fixed-ratio canvas

reactable Table Helpers

Cell renderers, column headers and team-colored cell styles for reactable tables.

reactable_sdv_logos() reactable_sdv_wordmarks() reactable_sdv_headshots()
Render Team Logos, Wordmarks and Headshots in 'reactable' Tables
reactable_sdv_cols_label()
Replace 'reactable' Column Headers with Team Logos
reactable_sdv_team_color_bar() reactable_sdv_team_color_bg()
Team-Colored Cell Styles for 'reactable' Tables

Team Utilities

Validate, clean and factor-order team abbreviations; look up team reference data and colors; control the image cache.

supported_sports()
Supported Sports
valid_team_names()
Output Valid Team Names
team_reference()
Get Team Reference Data
clean_team_abbrs()
Standardize Team Abbreviations
resolve_historical_abbr()
Resolve Historical Team Abbreviations
sdv_team_colors()
Get Team Colors
sdv_color_palette()
Get Team Color Palette
sdv_team_factor()
Order Team Names as a Factor
sdvplotR_clear_cache()
Clear the sdvplotR Caches

Court Coordinates

Convert stats.nba.com / stats.wnba.com shot-location columns into the sportyR basketball-court frame.

sdv_court_coords()
Convert stats.nba.com/stats.wnba.com Shot Locations to a sportyR Court Frame

Premade Plots

High-level functions that build complete branded plots.

sdv_team_tiers()
Create Team Tier Plots

Playing Surfaces

Regulation courts, fields and rinks from ‘sportyR’, styled in a team’s colors with its logo at center.

sdv_surface()
Team-Styled Playing Surfaces

Plot Titles

Add a logo or image next to a ggplot2 title.

ggtitle_image() theme_title_image()
Functions for Adding an Image to the Title of a ggplot

Re-exported from ggpath

Generic image geoms and theme elements provided by the ggpath backend.

Deprecated

Former gtUtils names, kept so ported code keeps working.

gt_color_legend() gt_centered_legend()
Deprecated legend functions