Skip to content
/ swag-bag Public

Access to color palettes and logos of sports teams, countries, and more.

License

Notifications You must be signed in to change notification settings

slizb/swag-bag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swag-Bag

Travis Codecov License: MIT

Swag-Bag is a convenient package for accessing the color palettes and logos of your favorite sports teams. It enables you to create beautifully themed visualizations with a little swag.

Installation

python and R packages are both currently under construction. Stay tuned for install instructions!

Usage

from swagbag import swag

colors = swag.TeamColors("Chicago Bulls", 2, "hex")

Then, you can hook into your favorite plotting package...

import seaborn as sns
import pandas as pd

df = pd.DataFrame([{'A':'Hodor', 'B':7},
                   {'A':'Bran', 'B':3}])

my_palette = sns.color_palette(colors)
sns.barplot(x='A', y='B', data=df, palette=my_palette, saturation=1)

bulls plot

Logos are queryable too...
import matplotlib.pyplot as plt

logo = swag.TeamLogos("Chicago Bulls")
plt.imshow(logo)

*NOTE: this project is in beta, so documentation may lag from present usage

About

Access to color palettes and logos of sports teams, countries, and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages