Skip to content

husky_theme, a theme for Altair charts based on the University of Washington branding guidelines

License

Notifications You must be signed in to change notification settings

deppen8/husky-altair-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

husky_theme for Altair

This repo defines husky_theme, a theme for Altair charts based on the University of Washington branding guidelines. That said, it is NOT an official product of the University of Washington. Check it out some examples on Binder without downloading or installing anything.

Binder

If you use the theme, I'd love to hear about it.

The theme was built with inspiration from Sergio Sánchez's excellent blog post: Consistently Beautiful Visualizations with Altair Themes.

Usage

  1. Obviously, you will need altair.

    • To run the examples notebook, you will also need vega_datasets, pandas, and numpy.
  2. This theme uses three fonts:

    • Encode Sans - Regular
    • Open Sans - Regular
    • Open Sans - Bold

    If you don't have these installed, all three fonts are all available via Google Fonts. You can get them from within a Jupyter Notebook with:

%%html
<style>
@import url('https://fonts.googleapis.com/css?family=Encode+Sans:400');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:700');
</style>
  1. Since the theme is defined in a .py file, you can register and enable it in Jupyter Notebook with the following magic:
%run husky_theme.py

Examples

Below are a few examples using the husky_theme to reproduce examples from the Altair Example Gallery.

The husky_theme.ipynb notebook contains a more complete series of examples. In a few cases, I have slightly altered the code from the Altair docs. These are noted along with the example. You can play around with the examples yourself by launching the notebook in Binder.

Binder

simple_scatter

simple_bar

simple_histogram

simple_stacked_area

multi_line

candlestick

Contributing

I welcome contributions/improvements to the theme. Feel free to submit a PR.

About

husky_theme, a theme for Altair charts based on the University of Washington branding guidelines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published