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 league 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

Table themes by source

122 surveyed table styles, by the name of the source they follow (datagolf, wikipedia, nejm, …), shared with the Python and JavaScript packages. gt_theme_source() and reactable_sdv_theme() apply any of them; the shortcuts name the most useful 20.

sdv_table_themes()
List the surveyed table themes
table_theme_spec()
Resolve a surveyed table theme
gt_theme_source()
A surveyed table style as a gt theme
reactable_sdv_theme()
A surveyed table style as a 'reactable' theme
gt_theme_basketball_reference()
Basketball-Reference table style for gt tables
gt_theme_datagolf()
DataGolf table style for gt tables
gt_theme_fivethirtyeight_site()
FiveThirtyEight (forecast tables) table style for gt tables
gt_theme_wikipedia()
Wikipedia wikitable table style for gt tables
gt_theme_cleaning_the_glass()
Cleaning the Glass table style for gt tables
gt_theme_bbc_sport()
BBC Sport table style for gt tables
gt_theme_opta_analyst()
Opta Analyst table style for gt tables
gt_theme_our_world_in_data()
Our World in Data table style for gt tables
gt_theme_bloomberg_markets()
Bloomberg.com Markets table style for gt tables
gt_theme_aer()
American Economic Review (AEA style) table style for gt tables
gt_theme_nzz()
NZZ (Q table) table style for gt tables
gt_theme_guardian()
The Guardian table style for gt tables
gt_theme_barttorvik()
Bart Torvik (T-Rank) table style for gt tables
gt_theme_espn_site()
ESPN (BPI / FPI tables) table style for gt tables
gt_theme_gov_uk()
GOV.UK Design System table table style for gt tables
gt_theme_washington_post()
The Washington Post (WPDS) table style for gt tables
gt_theme_reuters_graphics()
Reuters Graphics table style for gt tables
gt_theme_formula1()
Formula 1 table style for gt tables
gt_theme_dunks_and_threes()
Dunks & Threes table style for gt tables
gt_theme_economist()
The Economist table style for gt tables

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

Teams and Identifiers

The shared team index: list leagues and teams, resolve identifiers from any source, colours, logo and headshot URLs, and the data versions and cache.

sdv_leagues()
Leagues sdvplotR knows
sdv_teams()
Teams in the sdvplotR index
sdv_resolve()
Resolve team identifiers to canonical team ids
sdv_suggest()
Suggest teams for a value that did not resolve
sdv_clean_names()
Clean team names to one display name
sdv_aliases()
Team aliases in the sdvplotR index
sdv_add_athlete_id()
Add ESPN athlete ids to a data frame of player names
sdv_team_colors()
Team colours
sdv_color_palette()
Team colour palette
sdv_team_factor()
Order Team Names as a Factor
sdv_logo_url()
Team logo and wordmark URLs
sdv_marks()
Every archived mark for a team
sdv_headshot_url()
Player headshot URLs
sdv_versions()
Versions of the data sdvplotR is using
sdv_clear_cache()
Clear the sdvplotR caches
sdv_ggpreview()
Preview a ggplot at the size it will be saved

Court and Pitch Coordinates

Convert stats.nba.com shot locations and any soccer provider’s event coordinates into the frames the playing surfaces draw.

sdv_court_coords()
Convert Shot Locations to a sportyR Court Frame
sdv_pitch_coords()
Convert Soccer Event Coordinates to the sdvplotR Pitch Frame

Premade Plots

High-level functions that build complete branded plots.

sdv_team_tiers()
Create Team Tier Plots

Playing Surfaces

Every regulation court, field, rink and sheet ‘sportyR’ draws (59 surface keys, lacrosse, tennis, volleyball, curling and softball included); a team league’s surface takes a team’s colors and its logo at center.

sdv_surface()
Team-Styled Playing Surfaces

Hexagonal and Square Bins

Bin points into hexagons or equal-area squares, the lattice sdvplot and sdvplot-js share, and draw or link the cells.

sdv_bins() sdv_bin_ids()
Bin points into hexagons or squares
geom_sdv_bins()
Hexagonal or square bins
geom_sdv_bins_interactive()
Interactive hexagonal or square bins (ggiraph)

Interactive plots and maps

Team marks on plotly charts, interactive ggiraph layers and leaflet maps.

add_sdv_logos() add_sdv_wordmarks() add_sdv_headshots()
Team logos, wordmarks and headshots on plotly charts
sdv_axis_logos()
Team logos as plotly axis labels
sdv_colorway()
Team colours as a plotly colorway
geom_sdv_logos_interactive() geom_sdv_wordmarks_interactive() geom_sdv_headshots_interactive()
Interactive team logos, wordmarks and headshots (ggiraph)
addSdvLogoMarkers()
Team logo markers on a leaflet map

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

Example Data

Real final standings that the reference examples run on.

sdv_example_standings
Final regular-season standings for the examples

Re-exported from ggpath

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