Custom Altair themes and styling utilities
Project description
ecostyles
A Python package for consistent Altair chart styling and themes.
Installation
You can install the package directly from GitHub:
pip install git+https://github.com/jhellingsdata/ecostyles.git
Usage
from ecostyles import EcoStyles
# Create styles instance
styles = EcoStyles()
# Register and enable a theme
styles.register_and_enable_theme(theme_name="article") # or "cotd", "newsletter"
# Create your Altair chart
import altair as alt
chart = alt.Chart(data).mark_line().encode(...)
# Use helper methods
chart_with_source = styles.add_source(chart, "ONS") # returns a new chart; multi-line supported
styles.save(chart, "path/to/save", "chart_name") # or styles.save(chart, name="chart_name") to save to cwd
Features
- Pre-defined color palettes and themes
- Helper methods for common chart modifications
- Consistent styling across projects
- Support for dark mode
- Easy export to various formats
Requirements
- Python >= 3.10
- altair >= 6.2.0
- pandas >= 1.1.3
- vl-convert-python >= 1.7.0
- country-converter >= 1.0.0
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ecostyles-0.2.0.tar.gz.
File metadata
- Download URL: ecostyles-0.2.0.tar.gz
- Upload date:
- Size: 311.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155fe748c28d854fe2d016632ba6e238f5b5f68a1b7983e20388255e8297d0f0
|
|
| MD5 |
20f0fd2554a4b061d20ac264abf80edd
|
|
| BLAKE2b-256 |
e77e3ad07e32b0c436632494354cc6645400a8a4aa35b97f7e819a2d9b948658
|
Provenance
The following attestation bundles were made for ecostyles-0.2.0.tar.gz:
Publisher:
release.yml on jhellingsdata/ecostyles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecostyles-0.2.0.tar.gz -
Subject digest:
155fe748c28d854fe2d016632ba6e238f5b5f68a1b7983e20388255e8297d0f0 - Sigstore transparency entry: 2164338627
- Sigstore integration time:
-
Permalink:
jhellingsdata/ecostyles@0770031a8c5eba1bf628b2a55c12545858e5f210 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/jhellingsdata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0770031a8c5eba1bf628b2a55c12545858e5f210 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ecostyles-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ecostyles-0.2.0-py3-none-any.whl
- Upload date:
- Size: 309.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62a0ceccd916f9781ce1ba5c878fdd14ad95199f4fa34758b5741a0e0744f171
|
|
| MD5 |
ff86c3a7eb9f3ed452530578794a3c9b
|
|
| BLAKE2b-256 |
8d23b857b2039bf56391c7fb9f3679d11bd8078a3ebe8afe6774dce1bbca74b5
|
Provenance
The following attestation bundles were made for ecostyles-0.2.0-py3-none-any.whl:
Publisher:
release.yml on jhellingsdata/ecostyles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecostyles-0.2.0-py3-none-any.whl -
Subject digest:
62a0ceccd916f9781ce1ba5c878fdd14ad95199f4fa34758b5741a0e0744f171 - Sigstore transparency entry: 2164338641
- Sigstore integration time:
-
Permalink:
jhellingsdata/ecostyles@0770031a8c5eba1bf628b2a55c12545858e5f210 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/jhellingsdata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0770031a8c5eba1bf628b2a55c12545858e5f210 -
Trigger Event:
push
-
Statement type: