Package: sdvplotR 0.1.0

Saiem Gilani

sdvplotR: Sports Team Logo Plots in 'ggplot2', 'gt' and 'reactable'

A unified set of functions to visualize sports data across the 28 leagues of the SportsDataverse team index, including the National Football League, National Basketball Association, Women's National Basketball Association, Major League Baseball, National Hockey League, college football and basketball, and soccer, in 'ggplot2' plots, 'gt' tables and 'reactable' tables, and in interactive 'plotly', 'ggiraph' and 'leaflet' charts and maps. Team logos, wordmarks and player headshots can be drawn as plot layers, as axis text and inside table cells, in the design a team used in a given season, and team color scales map team identifiers to their official colors. Playing surfaces from 'sportyR' can be painted in a team's colors. Team identifiers from many data providers, including the codes of relocated franchises, are resolved to one canonical team id per league through the team index and logo manifest of the SportsDataverse logo archive <https://github.com/sportsdataverse/sdv-assets>, read at run time with a copy bundled in the package. Built on 'ggpath' following the conventions of 'nflplotR' and designed to work with the companion SportsDataverse data packages. Also includes the 'gtUtils' table themes, color legends, cut lines, significance notation, outlier flags and cropping and saving helpers for 'gt' tables.

Authors:Saiem Gilani [aut, cre, cph], Sebastian Carl [aut], Jared Lee [aut], Camden Kay [aut], Andrew Weatherman [aut]

sdvplotR_0.1.0.tar.gz
sdvplotR_0.1.0.zip(r-4.7-any)sdvplotR_0.1.0.zip(r-4.6-any)sdvplotR_0.1.0.zip(r-4.5-any)
sdvplotR_0.1.0.tgz(r-4.6-any)sdvplotR_0.1.0.tgz(r-4.5-any)
sdvplotR_0.1.0.tar.gz(r-4.7-any)sdvplotR_0.1.0.tar.gz(r-4.6-any)
sdvplotR_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
sdvplotR/json (API)

# Install 'sdvplotR' in R:
install.packages('sdvplotR', repos = c('https://sportsdataverse.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sportsdataverse/sdvplotr/issues

Pkgdown/docs site:https://sdvplotr.sportsdataverse.org

Datasets:

On CRAN:

Conda:

data-visualizationggplot2gtreactablesportssports-datasportsdataverse

2.95 score 3 stars 1 scripts 149 exports 62 dependencies

Last updated from:f6863802fa. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK185
source / vignettesOK264
linux-releaseOK186
macos-releaseOK138
macos-oldrelOK114
windows-develOK159
windows-releaseOK149
windows-oldrelOK126
wasm-releaseOK147

Exports:add_sdv_headshotsadd_sdv_logosadd_sdv_wordmarksaddSdvLogoMarkerselement_pathelement_rasterelement_sdv_headshotelement_sdv_logoelement_sdv_rasterelement_sdv_wordmarkgeom_from_pathgeom_mean_linesgeom_median_linesgeom_sdv_headshotsgeom_sdv_headshots_interactivegeom_sdv_logosgeom_sdv_logos_interactivegeom_sdv_wordmarksgeom_sdv_wordmarks_interactiveGeomFromPathGeomRefLinesGeomSDVheadshotGeomSDVlogoGeomSDVwordmarkggtitle_imagegt_538_captiongt_bold_rowsgt_border_bars_bottomgt_border_bars_topgt_border_gridgt_color_pillsgt_color_ranksgt_color_resultsgt_column_subheadersgt_cutlinegt_deltagt_fmt_rankgt_fmt_tallygt_gridgt_group_stripesgt_highlight_cellsgt_highlight_nagt_indicator_boxesgt_legend_continuousgt_legend_discretegt_marginaliagt_merge_stack_team_colorgt_outliersgt_percentile_bargt_row_accentgt_save_batchgt_save_cropgt_scale_notegt_sdv_cols_labelgt_sdv_headshotsgt_sdv_logosgt_sdv_wordmarksgt_set_fontgt_significancegt_snakegt_snake_aligngt_social_cropgt_social_taggt_spotlightgt_stack_tablesgt_theme_aergt_theme_almanacgt_theme_athleticgt_theme_barttorvikgt_theme_basketball_referencegt_theme_bbc_sportgt_theme_bloomberg_marketsgt_theme_booktabsgt_theme_broadsheetgt_theme_brutalistgt_theme_cleaning_the_glassgt_theme_datagolfgt_theme_drenchgt_theme_dunks_and_threesgt_theme_economistgt_theme_espn_sitegt_theme_fivethirtyeight_sitegt_theme_formula1gt_theme_gov_ukgt_theme_gtutilsgt_theme_guardiangt_theme_kenpomgt_theme_midnightgt_theme_ncaagt_theme_nzzgt_theme_opta_analystgt_theme_our_world_in_datagt_theme_plgt_theme_previewgt_theme_reuters_graphicsgt_theme_savantgt_theme_scoreboardgt_theme_sdvgt_theme_sdv_teamgt_theme_sofagt_theme_sourcegt_theme_swissgt_theme_terminalgt_theme_tiergt_theme_tuftegt_theme_washington_postgt_theme_wikipediagt_tiersgt_title_headergt_watermarkgt_wrap_labelspal_midnightreactable_sdv_cols_labelreactable_sdv_headshotsreactable_sdv_logosreactable_sdv_team_color_barreactable_sdv_team_color_bgreactable_sdv_themereactable_sdv_wordmarksscale_color_sdvscale_colour_sdvscale_fill_sdvscale_x_sdvscale_x_sdv_headshotsscale_y_sdvscale_y_sdv_headshotssdv_axis_logossdv_clear_cachesdv_color_palettesdv_colorwaysdv_court_coordssdv_headshot_urlsdv_leaguessdv_logo_urlsdv_markssdv_pitch_coordssdv_resolvesdv_suggestsdv_surfacesdv_table_themessdv_team_colorssdv_team_factorsdv_team_tierssdv_teamssdv_versionstable_theme_spectheme_title_imagetheme_x_sdvtheme_y_sdv

Dependencies:base64encbigDbitopsbslibcachemclicommonmarkcpp11curldigestdplyrevaluatefarverfastmapfontawesomefsgenericsggpathggplot2gluegtgtablehighrhtmltoolshtmlwidgetsisobandjquerylibjsonlitejuicyjuiceknitrlabelinglifecyclelitedownmagickmagrittrmarkdownmemoisemimepillarpkgconfigR6rappdirsRColorBrewerRcppreactablereactRrlangrmarkdownS7sassscalestibbletidyselecttinytexutf8V8vctrsviridisLitewithrxfunxml2yaml

Readme and manuals

Help Manual

Help pageTopics
Team logos, wordmarks and headshots on plotly chartsadd_sdv_headshots add_sdv_logos add_sdv_wordmarks
Team logo markers on a leaflet mapaddSdvLogoMarkers
Theme Elements for Image Grobselement_sdv_headshot element_sdv_logo element_sdv_raster element_sdv_wordmark
ggplot2 Layer for Visualizing Player HeadshotsGeomSDVheadshot geom_sdv_headshots
ggplot2 Layer for Visualizing Sports Team LogosGeomSDVlogo geom_sdv_logos
Interactive team logos, wordmarks and headshots (ggiraph)geom_sdv_headshots_interactive geom_sdv_logos_interactive geom_sdv_wordmarks_interactive
ggplot2 Layer for Visualizing Sports Team WordmarksGeomSDVwordmark geom_sdv_wordmarks
Functions for Adding an Image to the Title of a ggplotggtitle_image theme_title_image
Add a 538-style caption to a 'gt' tablegt_538_caption
Bold rows in a 'gt' tablegt_bold_rows
Add horizontal bars to the bottom of a 'gt' tablegt_border_bars_bottom
Add horizontal bars to the top of a 'gt' tablegt_border_bars_top
Add a border grid to a 'gt' tablegt_border_grid
Add color pills to 'gt' table columnsgt_color_pills
Color ranked columns of a 'gt' tablegt_color_ranks
Color rows of a 'gt' table by win, loss, or tie resultgt_color_results
Add stacked column headers with subtitles to a 'gt' tablegt_column_subheaders
Draw a labeled cut line between rows of a 'gt' tablegt_cutline
Add a computed change column to a 'gt' tablegt_delta
Format numbers as ordinals in a 'gt' tablegt_fmt_rank
Combine count columns into a single cell in a 'gt' tablegt_fmt_tally
Arrange several 'gt' tables in a gridgt_grid
Band alternate row groups of a 'gt' tablegt_group_stripes
Fill individual cells in a 'gt' table by a conditiongt_highlight_cells
Style and relabel missing values in a 'gt' tablegt_highlight_na
Add colored indicator boxes to a 'gt' tablegt_indicator_boxes
Add a color legend to a 'gt' tablegt_legend_continuous
Add a discrete color key to a 'gt' tablegt_legend_discrete
Style a column as margin notesgt_marginalia
Merge and Stack Text in gt Tables with Team Colorsgt_merge_stack_team_color
Flag outlying values in a 'gt' tablegt_outliers
Draw percentile bars in a 'gt' tablegt_percentile_bar
Put a colored bar on the leading edge of each rowgt_row_accent
Save a matched set of images, one per groupgt_save_batch
Save a 'gt' table to an image and trim its whitespacegt_save_crop
Scale columns and disclose the scalinggt_scale_note
Render Logos in 'gt' Table Column Labelsgt_sdv_cols_label
Render Player Headshots in 'gt' Tablesgt_sdv_headshots
Render Logos in 'gt' Tablesgt_sdv_logos
Render Wordmarks in 'gt' Tablesgt_sdv_wordmarks
Set one font family across a whole 'gt' tablegt_set_font
Add significance stars to a 'gt' tablegt_significance
Lay a long table out in side-by-side blocksgt_snake
Reshape a parallel frame to match a snaked tablegt_snake_align
Save a 'gt' table onto a fixed-ratio canvasgt_social_crop
Add social handles to a 'gt' tablegt_social_tag
Focus on rows of a 'gt' table by dimming the restgt_spotlight
Stack several 'gt' tables verticallygt_stack_tables
American Economic Review (AEA style) table style for 'gt' tablesgt_theme_aer
Record-book theme for 'gt' tablesgt_theme_almanac
The Athletic theme for 'gt' tablesgt_theme_athletic
Bart Torvik (T-Rank) table style for 'gt' tablesgt_theme_barttorvik
Basketball-Reference table style for 'gt' tablesgt_theme_basketball_reference
BBC Sport table style for 'gt' tablesgt_theme_bbc_sport
Bloomberg.com Markets table style for 'gt' tablesgt_theme_bloomberg_markets
Academic booktabs theme for 'gt' tablesgt_theme_booktabs
Editorial serif theme for 'gt' tablesgt_theme_broadsheet
Heavy-rule display theme for 'gt' tablesgt_theme_brutalist
Cleaning the Glass table style for 'gt' tablesgt_theme_cleaning_the_glass
DataGolf table style for 'gt' tablesgt_theme_datagolf
Saturated single-color theme for 'gt' tablesgt_theme_drench
Dunks & Threes table style for 'gt' tablesgt_theme_dunks_and_threes
The Economist table style for 'gt' tablesgt_theme_economist
ESPN (BPI / FPI tables) table style for 'gt' tablesgt_theme_espn_site
FiveThirtyEight (forecast tables) table style for 'gt' tablesgt_theme_fivethirtyeight_site
Formula 1 table style for 'gt' tablesgt_theme_formula1
GOV.UK Design System table table style for 'gt' tablesgt_theme_gov_uk
gtUtils theme for 'gt' tablesgt_theme_gtutils
The Guardian table style for 'gt' tablesgt_theme_guardian
KenPom theme for 'gt' tablesgt_theme_kenpom
Dark theme for 'gt' tablesgt_theme_midnight
NCAA theme for 'gt' tablesgt_theme_ncaa
NZZ (Q table) table style for 'gt' tablesgt_theme_nzz
Opta Analyst table style for 'gt' tablesgt_theme_opta_analyst
Our World in Data table style for 'gt' tablesgt_theme_our_world_in_data
Premier League theme for 'gt' tablesgt_theme_pl
Preview data in every themegt_theme_preview
Reuters Graphics table style for 'gt' tablesgt_theme_reuters_graphics
Baseball Savant theme for 'gt' tablesgt_theme_savant
Broadcast-graphics theme for 'gt' tablesgt_theme_scoreboard
SportsDataverse theme for 'gt' tablesgt_theme_sdv
Team-colored SportsDataverse theme for 'gt' tablesgt_theme_sdv_team
SofaScore theme for 'gt' tablesgt_theme_sofa
A surveyed table style as a 'gt' themegt_theme_source
International Typographic Style theme for 'gt' tablesgt_theme_swiss
Data-terminal theme for 'gt' tablesgt_theme_terminal
Tier list theme for 'gt' tablesgt_theme_tier
Minimal-ink theme for 'gt' tablesgt_theme_tufte
The Washington Post (WPDS) table style for 'gt' tablesgt_theme_washington_post
Wikipedia wikitable table style for 'gt' tablesgt_theme_wikipedia
Color and bold the tier column of a 'gt' tablegt_tiers
Build a styled header block for a 'gt' tablegt_title_header
Put a watermark behind a 'gt' tablegt_watermark
Break long column labels across lines in a 'gt' tablegt_wrap_labels
A rank palette for dark backgroundspal_midnight
Replace 'reactable' Column Headers with Team Logosreactable_sdv_cols_label
Render Team Logos, Wordmarks and Headshots in 'reactable' Tablesreactable_sdv_headshots reactable_sdv_images reactable_sdv_logos reactable_sdv_wordmarks
Team-Colored Cell Styles for 'reactable' Tablesreactable_sdv_team_color reactable_sdv_team_color_bar reactable_sdv_team_color_bg
A surveyed table style as a 'reactable' themereactable_sdv_theme
Axis Scales for Sports Team Logosscale_x_sdv scale_x_sdv_headshots scale_y_sdv scale_y_sdv_headshots
Scales for Sports Team Colorsscale_color_sdv scale_colour_sdv scale_fill_sdv
Team logos as plotly axis labelssdv_axis_logos
Clear the sdvplotR cachessdv_clear_cache
Team colour palettesdv_color_palette
Team colours as a plotly colorwaysdv_colorway
Convert Shot Locations to a sportyR Court Framesdv_court_coords
Final regular-season standings for the examplessdv_example_standings
Player headshot URLssdv_headshot_url
Leagues sdvplotR knowssdv_leagues
Team logo and wordmark URLssdv_logo_url
Every archived mark for a teamsdv_marks
Convert Soccer Event Coordinates to the sdvplotR Pitch Framesdv_pitch_coords
Resolve team identifiers to canonical team idssdv_resolve
Suggest teams for a value that did not resolvesdv_suggest
Team-Styled Playing Surfacessdv_surface
List the surveyed table themessdv_table_themes
Team colourssdv_team_colors
Order Team Names as a Factorsdv_team_factor
Create Team Tier Plotssdv_team_tiers
Teams in the sdvplotR indexsdv_teams
Versions of the data sdvplotR is usingsdv_versions
Resolve a surveyed table themetable_theme_spec
Background colors used by the gt_theme_*() table themestheme_bg
Theme Helpers for SDV Axis Labelstheme_x_sdv theme_y_sdv