This repo provides a variety of scripts to analyze the data from Weightlifting App 💪
You can either use your own data or use the example data provided in the data/example-*.wld files.
- Open Weightliting App on your iPhone and navigate to User -> Settings -> Export All Data.
-
Send the data to yourself (eg. via email)
-
Place your
.wldfile in thedatafolder and pass its path toload_training_datasetor the source adapter used by the analysis. Personal files underdata/are ignored by Git.
Python 3.10 or newer is required.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[notebooks]"Use the notebooks in src/ to explore and read analyses. Use commands in
scripts/ for repeatable or headless runs. Reusable calculations live in
importable modules under src/; notebooks and scripts should call the same
implementation rather than duplicate it. See
docs/analysis-architecture.md for the full
convention.
For analyses that would otherwise walk the nested export structure, load the canonical dataset instead. It returns flat workout, exercise, and set DataFrames with documented columns (see docs/training-dataset.md):
from training_dataset import load_training_dataset
data = load_training_dataset("../data/example-chappy.wld")
data.sets[data.sets["display_name"] == "Flat Barbell Bench Press"]Key analyses:
src/analyze_training_program.ipynb: live full-history training style, direct and estimated muscle-group volume, frequency, current split inference, and like-for-like press progression. A run writes its recommendation tooutputs/training-program-recommendation.md.- Use
src/analyze_big_three.ipynbfor lifetime Big Three progression, annual snapshots, historical trends, and one-year projections. - Use
src/analyze_bodyweight_strength_evals.ipynbfor bodyweight-aligned strength history, all-attempt Pareto frontiers, and social-card exports for bench, squat, deadlift, and overhead press. scripts/analyze_dexa.pyanalyzes DEXA history, lean-mass trend residuals, dated scan paths, and modeled one-point body-fat contours.
To forecast the bodyweight at which a target DEXA body-fat percentage is reached:
source .venv/bin/activate
python scripts/forecast_bulk_ceiling.py --output-dir outputsThe run reads data/dexa.csv and writes a Markdown report, a probability-curve
CSV, and a chart. It is seeded, so repeat runs reproduce byte for byte.
Modeling assumptions are set with --target-body-fat-pct, --simulations,
--seed, --measurement-error-pp, --partition-noise-scale,
--resample-unit, and --max-weight-lb. The report prints every one of them
alongside the result, along with a held-out predictive score.
Planning inputs are optional and have no silent defaults. Without
--current-bodyweight-lb (or --weight-log, a weekly CSV with Week of and
Average columns) headroom is measured from the DEXA scan weight and labelled
as such. Without --weekly-bulk-rate-lb no duration is reported:
python scripts/forecast_bulk_ceiling.py \
--current-bodyweight-lb 200 --weekly-bulk-rate-lb 0.5To refresh the bodyweight and DEXA CSV exports from Weight Log.xlsx:
python scripts/convert_weight_xlsx.py
python scripts/convert_dexa_xlsx.pyInstall the test dependencies and run the complete suite from the repository root:
python -m pip install -e ".[dev,notebooks]"
python -m pytestAgent instructions are in AGENTS.md. Shared chart conventions and the baseline-comparison workflow are in docs/chart-style.md.
Feel free to contribute to this repo by adding your own scripts or improving existing ones.
This project is open-sourced under the MIT License - see the LICENSE file for details.
