Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Cycle Plotter

GitHub Actions Workflow Status GitHub License GitHub top language GitHub last commit

This command-line tool reads data from an Apple Health or Withings Health Mate export, and creates a plot of cycle durations.

On the x-axis, we have the date at the beginning of a cycle.

On the y-axis, we have the duration of the cycle. The duration of a cycle is the number of days between its start, and the start of the next cycle.

Sample graphs

The datasets for these graphs were generated by ChatGPT. They don't corespond to any real person.

Regular cycles

Cycles covering a period of 6 months, with little variation in cycle length.

Pregnancy

Cycles covering a period of just over one year, with a pregnancy during that time.

--axis x --axis y --axis both (default)

Usage

Run the program with the --help argument to see the full usage.

% python -m cycleplotter.main --help
usage: main.py [-h] -i INPUT_FILE -o OUTPUT_FILE -s {apple,withings} [-a {x,y,both}] [-d DIMENSIONS]

options:
  -h, --help            show this help message and exit
  -i INPUT_FILE, --input-file INPUT_FILE
                        path to archive exported from
                        Apple Health or Withings Health Mate
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        path to image file to export
  -s {apple,withings}, --source {apple,withings}
  -a {x,y,both}, --axis {x,y,both}
                        Indicate the cycle durations on:

                        x: the x-axis, by horizontal spacing between points
                        y: the y-axis, by their values
                        both: both axes

                        Default both.
  -d DIMENSIONS, --dimensions DIMENSIONS
                        The size of the image to create.

                        Supported values are:
                          a4
                          letter
                          <width>x<height><unit>

                        Supported units are in, cm, and px.

                        Example: 600x400px

                        Default a4.

The program has been tested exporting to png and pdf. But other formats are probably supported. The program uses matplotlib to output the image. The supported file formats may be in the matplotlib documentation.

Examples:

Export a png of data from Apple Health, using long arguments:

python -m cycleplotter.main --input-file ~/Downloads/export.zip  --output-file /tmp/cyclegraph.png --source apple

Export a pdf of data from Withings Health Mate, using short arguments:

python -m cycleplotter.main -i ~/Downloads/data_ABC_1717249954.zip  -o /tmp/cyclegraph.pdf -s withings

How to get the health data files

See the steps here.

Metadata

Release files for cycle-plotter 0.0.1rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cycle-plotter 0.0.1rc2
File Size Uploaded
cycle_plotter-0.0.1rc2.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cycle-plotter 0.0.1rc2
File Interpreter ABI Platform
cycle_plotter-0.0.1rc2-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / cycle_plotter-0.0.1rc2.tar.gz

Download URL cycle_plotter-0.0.1rc2.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
964cb619150fd9826395568b4681ae49be7c445a9a62a23006444bade4e67fe2
BLAKE2b-256 checksum
How to use checksums
08fdf9f862d093e5d4148d6ae47594bb1ee6f0cbb42948e0f9780d027bf0b51e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / cycle_plotter-0.0.1rc2-py3-none-any.whl

Download URL cycle_plotter-0.0.1rc2-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d343831cbf5c5b13aaa2e5a4c00d99554d40b052c7586b9f012226be5f80276
BLAKE2b-256 checksum
How to use checksums
b2847b1bad780cef21ffb578adbb987ede40c6895001a0bd1004d5a4e08e097d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.1rc2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page