Install and try it
pip install git+https://github.com/sportsdataverse/sdvplot
import sdvplot
sdvplot.resolve(["KC", "Kansas City Chiefs", 12], "nfl")
sdvplot.palette("nfl", teams=["KC", "SF"])
sdvplot.team_colors(["LAL", "BOS"], "nba")
sdvplot.team_colors("NYY", "mlb", which="secondary")
['12', '12', '12']
{'KC': '#e31837', 'SF': '#aa0000'}
['#552583', '#008348']
'#c4ced4'
These calls run offline against the team index bundled with the package. Getting started lists the extras.
What it draws








Team colors from palette()
- Kansas City ChiefsNFL
#e31837 #ffb612 - San Francisco 49ersNFL
#aa0000 #b3995d - Los Angeles LakersNBA
#552583 #fdb927 - Boston CelticsNBA
#008348 #ffffff - New York YankeesMLB
#132448 #c4ced4 - Los Angeles DodgersMLB
#005a9c #ffffff
Any identifier
Pass the team ids you already have — ESPN ids, nflverse or FanGraphs abbreviations, CFBD names, nba_api ids, NHL codes — and sdvplot resolves them, season-aware, without ever guessing.
Logos for every era
Logos and wordmarks come from the SportsDataverse logo archive with season ranges, so the 2010 Raiders get the Oakland mark.
Team colors
palette() returns a plain {team: hex} mapping that seaborn, Plotly, Altair and Bokeh accept as-is.
Headshots
ESPN athlete ids for the NFL, NBA, WNBA, MLB, NHL and college football and basketball, and NFL gsis ids through the nflverse player table, matching sdvplotR.
pandas and polars
Scalars, lists, numpy arrays and pandas/polars Series in, the same container back — the pandas index kept.
Part of the SportsDataverse
The Python counterpart to sdvplotR, built on the same archive as sdv-py.