Calendar heatmaps from Pandas time series data
Project description
Calplot creates heatmaps from Pandas time series data.
Plot Pandas time series data sampled by day in a heatmap per calendar year using matplotlib.
Installation
To install the latest release via PyPI using pip
:
pip install calplot
Changelog
Package calplot was started as a fork of calmap with the addition of new arguments for easier customization.
See CHANGES.rst for changelog.
Usage
See API documentation.
Examples
The following examples are run in a Jupyter notebook.
import calplot
import numpy as np; np.random.seed(sum(map(ord, 'calplot')))
import pandas as pd
all_days = pd.date_range('1/1/2019', periods=730, freq='D')
days = np.random.choice(all_days, 500)
events = pd.Series(np.random.randn(len(days)), index=days)
calplot.calplot(events)
all_days = pd.date_range('1/1/2019', periods=360, freq='D')
days = np.random.choice(all_days, 500)
events = pd.Series(np.random.randn(len(days)), index=days)
calplot.calplot(events, edgecolor=None, cmap='YlGn')
calplot.calplot(events, yearlabel_kws={'color': 'black'}, cmap='YlGn')
calplot.calplot(events, textformat='{:.0f}', textfiller='-', cmap='YlGn')
calplot.calplot(events, dropzero=False, cmap='YlGn')
calplot.calplot(events, colorbar=False, suptitle='Random data from standard normal distribution', cmap='YlGn')
calplot.calplot(events, linewidth=0, cmap='YlGn')
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
calplot-0.1.7.tar.gz
(8.3 kB
view details)
Built Distribution
File details
Details for the file calplot-0.1.7.tar.gz
.
File metadata
- Download URL: calplot-0.1.7.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 863c579ff12ec323ec4be78ed1ece934895c9c1a5cea3c8a704a9c05a48fe800 |
|
MD5 | 2ff52b66d3f143a7f0c6f92e47acffa0 |
|
BLAKE2b-256 | 4ca674665e5b8ccebf813e50b518742717532bf718f1d7d878bec5d8cc4c67d2 |
File details
Details for the file calplot-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: calplot-0.1.7-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | daa7609eed4493780a65d9dd16a626787db67d5847802849d03766cd4c957266 |
|
MD5 | 752c5d82b9048034dd64d141be23dd34 |
|
BLAKE2b-256 | 88fa39b59cec3e977eaedee99df7ec598d1f3ae35f713b71e311979caca42782 |