A lightweight health data analytics tool for monthly time-series visualization and distribution analysis.
Project description
๐ rr2graph โ Visualize Blood Pressure, Pulse, and Weight Data
rr2graph is a lightweight command-line tool for processing and visualizing blood pressure, pulse, and weight data stored in Excel files.
It generates monthly plots (box-swarm, scatter, histogram, violin) and exports them automatically as PNG, PDF, and SVG.
๐ค Example Output
Example visualization using scatter and box-swarm plots:
Format: A4 Landscape (11.69 ร 8.27 inch)
The CLI prints all generated files:
Heart rows read: 81
Weight rows read: 49
โ Excel file: rr_data.xlsx
โ Months: 3
โ Output folder: plots/
Generating histogram plotsโฆ
Generated histogram plots stored at:
โ plots/png/(2026-02__2026-04 3 months) per month data and histogram.png
โ plots/pdf/(2026-02__2026-04 3 months) per month data and histogram.pdf
โ plots/svg/(2026-02__2026-04 3 months) per month data and histogram.svg
โฆ
๐ณ Docker Quickstart (End User)
If you want to use rr2graph without installing Python locally, see the full guide here:
๐ Docker Quickstart
๐ Python Quickstart (Virtual Environment, End User)
If you want to run rr2graph locally in an isolated Python environment, see the step-by-step guide here:
๐ Virtual Environment Quickstart
โก Python Quickstart with uv (End User)
If you prefer using the modern Python tool uv:
๐ uv Quickstart
๐ Installation
This project supports Pipenv-based installation.
-
Ensure you are in the project root
~/your/project/directory/
-
Install in editable mode using Pipenv
pipenv install -e .
This installs:
- the rr2graph package (editable mode)
- all dependencies defined in pyproject.toml
-
Optional: Development dependencies
pipenv install -r requirements_dev.txt
๐งฐ CLI Usage
After installation, the command rr2graph becomes available.
Show help:
rr2graph --help
usage: rr2graph [-h] [-e EXCEL] [-n NUM_OF_MONTHS] [-o OUTPUT] [-c CONFIG] [-v] [-g] [-i]
Reads Excel data and generates plots.
options:
-h, --help Show help and exit
-e, --excel EXCEL Path to Excel file (default: rr_data.xlsx)
-n, --num_of_months NUM_OF_MONTHS
Number of months 1โ6 (default: 3)
-o, --output OUTPUT Output folder for generated plots (default: plots/)
-c, --config CONFIG Optional YAML configuration file
-v, --version Show program version and exit
-g, --generate-test-data
Generate test_rr_data.xlsx and exit
-i, --info Show system and configuration information
๐งช Generate Test Data
rr2graph -g
Creates:
test_rr_data.xlsx
with realistic blood pressure, pulse, and weight data.
โน๏ธ System & Configuration Info
rr2graph --info
Example output:
rr2graph info
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Version: 1.1.0
Python: 3.11.15
Installed at: /opt/homebrew/lib/python3.11/site-packages/rr2graph
Working dir: /Users/your_user/rr2graph_test
System: Darwin 25.3.0 (arm64)
Terminal: utf-8
No config file found (config.yaml missing).
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Everything looks good โ
๐ Configuration File (YAML)
Example config.yaml:
excel: "rr_data.xlsx"
num_of_months: 3
output: "plots/"
| Field | Description |
|---|---|
| excel | Path to the Excel file containing RR data |
| num_of_months | Number of months to analyze |
| output | Output directory for PNG/PDF/SVG plots |
Use it via:
rr2graph -c config.yaml
๐ Output Structure
Running:
rr2graph -c config.yaml
produces:
plots/
โโโ png/
โโโ pdf/
โโโ svg/
๐ Project Structure
/your/project/directory/
.
โโโ CHANGELOG.md
โโโ coverage.ini
โโโ Dockerfile
โโโ examples
โย ย โโโ example_box_swarm.png
โโโ LICENSE
โโโ Makefile
โโโ man
โย ย โโโ install-man.sh
โย ย โโโ rr2graph.1
โย ย โโโ uninstall-man.sh
โโโ MANIFEST.in
โโโ Pipfile
โโโ Pipfile.lock
โโโ plots
โโโ pyproject.toml
โโโ pytest.ini
โโโ README_DOCKER.md
โโโ README_UV.md
โโโ README_VENV.md
โโโ README.md
โโโ requirements_dev.txt
โโโ requirements.txt
โโโ rr2graph
โย ย โโโ __init__.py
โย ย โโโ cli.py
โย ย โโโ helpers.py
โย ย โโโ io.py
โย ย โโโ layout.py
โย ย โโโ monthly.py
โย ย โโโ orchestrator.py
โย ย โโโ plots
โย ย โย ย โโโ __init__.py
โย ย โย ย โโโ box_swarm.py
โย ย โย ย โโโ hist.py
โย ย โย ย โโโ scatter.py
โย ย โย ย โโโ violin.py
โย ย โโโ tools
โย ย โโโ __init__.py
โย ย โโโ bump_version.py
โโโ tests
โโโ conftest.py
โโโ README.md
โโโ test_cli.py
โโโ test_helpers.py
โโโ test_io.py
โโโ test_layout.py
โโโ test_monthly.py
โโโ test_orchestrator.py
โโโ test_plots.py
โโโ tools
โโโ test_bump_version.py
๐งช Run Tests
pipenv run pytest
๐ Troubleshooting
โ UnicodeDecodeError in YAML
You likely passed an Excel file as --config.
Correct:
rr2graph -c config.yaml
Incorrect:
rr2graph -c test_rr_data.xlsx
โ CLI command not found
Reinstall:
pipenv install -e .
๐จโ๐ป Developer Notes
Version bumping is handled via:
make version-patch
make version-minor
make version-major
TestPyPI upload:
make publish-test
Build artifacts:
make build
Manpage installation:
make install-man
make man
๐ License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rr2graph-0.3.2.tar.gz.
File metadata
- Download URL: rr2graph-0.3.2.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
775bd7ca25da9828cfb39232f7c0e3e0bb2bdf7569fa9d24e8b1d60236dc0f3c
|
|
| MD5 |
7f3a934c71b5b3e169b674cc5d21a1a6
|
|
| BLAKE2b-256 |
6b22aa0f2f984904655a7d28d8c2b1e1cd73c3f4652a622b6c75e35e1fa99d0d
|
File details
Details for the file rr2graph-0.3.2-py3-none-any.whl.
File metadata
- Download URL: rr2graph-0.3.2-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89f384aaa26e99107c064dc15c7e8c5a9920429b6534678e003e78e0462a5f72
|
|
| MD5 |
905357a95e9c8d52a8576293b6c120e2
|
|
| BLAKE2b-256 |
494186d70d5b08f2e198ccb9852f8360fbccaad960aebe8f0fe28b3b3cab1162
|