Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deppen8/husky-altair-theme
husky_theme, a theme for Altair charts based on the University of Washington branding guidelines
https://github.com/deppen8/husky-altair-theme
Last synced: 2 days ago
JSON representation
husky_theme, a theme for Altair charts based on the University of Washington branding guidelines
- Host: GitHub
- URL: https://github.com/deppen8/husky-altair-theme
- Owner: deppen8
- License: mit
- Created: 2018-10-12T19:04:08.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T17:10:13.000Z (about 6 years ago)
- Last Synced: 2024-08-04T01:13:32.902Z (3 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 8.28 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vega - husky_theme - Theme based on the University of Washington [brand](https://www.washington.edu/brand/). (Altair / Packages)
README
# `husky_theme` for Altair
This repo defines `husky_theme`, a theme for Altair charts based on the [University of Washington branding guidelines](http://www.washington.edu/brand/graphic-elements/). 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](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/deppen8/husky-altair-theme/master?filepath=husky_theme_examples.ipynb)
If you use the theme, [I'd love to hear about it]([email protected]).
The theme was built with inspiration from Sergio Sánchez's excellent blog post: [Consistently Beautiful Visualizations with Altair Themes](https://towardsdatascience.com/consistently-beautiful-visualizations-with-altair-themes-c7f9f889602).
## 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 - BoldIf 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:
```python
%%html@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');```
3. Since the theme is defined in a `.py` file, you can register and enable it in Jupyter Notebook with the following magic:
```python
%run husky_theme.py
```## Examples
Below are a few examples using the `husky_theme` to reproduce examples from the [Altair Example Gallery](https://altair-viz.github.io/gallery/index.html).
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](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/deppen8/husky-altair-theme/master?filepath=husky_theme_examples.ipynb)
![simple_scatter](images/simple_scatter.png)
![simple_bar](images/simple_bar.png)
![simple_histogram](images/simple_histogram.png)
![simple_stacked_area](images/simple_stacked_area.png)
![multi_line](images/multi_line.png)
![candlestick](images/candlestick.png)
## Contributing
I welcome contributions/improvements to the theme. Feel free to submit a PR.