A set of functions to visualize NFL analysis in ggplot2 plots and gt tables using team logos, wordmarks, and player headshots.
This manual describes the nflplotR package for visualizing NFL data in R. It includes functions to display team logos, wordmarks, and player headshots in ggplot2 and gt tables. The package integrates with ggplot2 and gt for seamless visualization. It also includes utility functions for clearing caches and customizing plot elements.
The package requires R >= 4.1.0 and depends on several R packages including ggplot2, gt, and nflreadr. It provides theme elements like element_nfl_logo() and element_nfl_headshot() to replace text with images in plots. Examples demonstrate how to use these elements in plots and tables.
Use the element_nfl_logo() function in the theme to replace team abbreviations with logos.
Use the element_nfl_headshot() function in the theme to replace player GSIS IDs with headshots.