July
A small library for creating pretty heatmaps of daily data.
Features
- Get rid of the eternal matplotlib tweaking every time you want to plot data in proper calendar format.
- Generate GitHub activity overview-like heatmaps of your daily data.
- Automatic handling of missing dates in input date range.
Julydoes not rely only pandas (though it accepts it). Only numpy arrays and native Python data structures are used internally.- Accepted date formats:
datetime.datetime,datetime.date,str,pd.DatetimeIndex
Install
$ pip install july
Usage
import numpy as np
import matplotlib.pyplot as plt
import july
from july.utils import date_range
dates = date_range("2020-01-01", "2020-12-31")
data = np.random.randint(0, 14, len(dates))
# GitHub Activity like plot (for someone with consistently random work patterns).
july.heatmap(dates, data, title='Github Activity', cmap="github")
# Here, 'osl_df' is a pandas df.
july.heatmap(osl_df.date, osl_df.temp, cmap="golden", colorbar=True, title="Average temperatures: Oslo , Norway")
# More exhaustive example using useless, but pretty colours.
july.heatmap(dates=dates,
data=data,
cmap='Pastel1',
month_grid=True,
horizontal=True,
value_label=False,
date_label=False,
weekday_label=True,
month_label=True,
year_label=True,
colorbar=False,
fontfamily="monospace",
fontsize=12,
title=None,
titlesize='large',
dpi=100)
# Month plot with dates.
july.month_plot(dates, data, month=5, date_label=True, ax=axes[0])
# Month plot with values.
july.month_plot(dates, data, month=5, value_label=True, ax=axes[1])
# Calendar plot.
july.calendar_plot(dates, data)
Why "July"?
Main reason: All the obvious names like calplot, calmap, and calendarplot were all already taken by similar packages. This had me looking for a new name that wouldn't get easily mixed up with the other packages.
The reasoning was roughly as follows:
Heatmap+month→Hot month→July✨
Also, as a summer loving person stuck in the Northern hemisphere, July is my favourite month by a light year.
Release notes
v0.1.0: Working build but with minimal documentation.v0.1.1: Fix relative image link in readme.v0.1.2: Remove unnecessary argument from rcmod to be compatible with matplotlib versions earlier than v3.4.x.v0.1.3: Fix week number labelling bug inmonth_plot()andcalendar_plot()
TODO:
- Fix slight misalignment of plot and cbar when
date_gridandcolorbarare used in conjunction. - Document everything...
- Add type hints.
- Add automatic date handling for strings of more types than just
YYYY-MM-DD.
Metadata
Release files for july 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| july-0.1.3.tar.gz | 13.5 kB | Without provenance | Details for july-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| july-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for july-0.1.3-py3-none-any.whl |
Total release size: 26.5 kB
Release files / july-0.1.3.tar.gz
| Download URL | july-0.1.3.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d315c249210a7f608e27d2077eecbebe90bf6627a0faae934da6c416652ca423
|
|
BLAKE2b-256 checksum How to use checksums |
ae8cd8e28b4a74eeb0bcae2bbbd2c7559b84ec23e21cfb822fd060cc514c6ec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0
|
Release files / july-0.1.3-py3-none-any.whl
| Download URL | july-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f934a407cdc328830344adb1fb140c34bada34e27da5e069f80a2617d1d1d915
|
|
BLAKE2b-256 checksum How to use checksums |
3f0e420372c1576d3e60833d19fcddce4694366cd14d3526df1e8a79ad8dfddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0
|
Security for july 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.