Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecostyles-0.2.0.tar.gz (311.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecostyles-0.2.0-py3-none-any.whl (309.6 kB view details)

Uploaded Python 3

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

Hashes for ecostyles-0.2.0.tar.gz
Algorithm Hash digest
SHA256 155fe748c28d854fe2d016632ba6e238f5b5f68a1b7983e20388255e8297d0f0
MD5 20f0fd2554a4b061d20ac264abf80edd
BLAKE2b-256 e77e3ad07e32b0c436632494354cc6645400a8a4aa35b97f7e819a2d9b948658

See more details on using hashes here.

Provenance

The following attestation bundles were made for ecostyles-0.2.0.tar.gz:

Publisher: release.yml on jhellingsdata/ecostyles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ecostyles-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62a0ceccd916f9781ce1ba5c878fdd14ad95199f4fa34758b5741a0e0744f171
MD5 ff86c3a7eb9f3ed452530578794a3c9b
BLAKE2b-256 8d23b857b2039bf56391c7fb9f3679d11bd8078a3ebe8afe6774dce1bbca74b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for ecostyles-0.2.0-py3-none-any.whl:

Publisher: release.yml on jhellingsdata/ecostyles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page