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, colorbar=False, cmap='YlGn')
calplot.calplot(events, 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.3.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for calplot-0.1.7.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64b30dbf565f6508fc09b383569a6658af5dbff4ede8058e5cc3704354c66552 |
|
MD5 | e87c44669990c4899c24a6a8f96fe918 |
|
BLAKE2b-256 | c2a6f03ba12ce9b49d7f8e61548eec54d9a83e0810ae28e668f14980979ba0d7 |