This repository provides some notebooks to analyze the Apple Health App data export dump as well as visualizations.
Add the exported dump (see here for information), usally named export.zip, into the directory data/raw/export.zip. The AppleHealthParser is able to unzip and parse it.
Install the package as shown in the installation section. Or simply use:
pip install health-trackingIn order to set up the necessary environment:
- create an environment
health-trackingwith the help of conda,conda env create -f environment.yaml - activate the new environment with
conda activate health-tracking - install
health-trackingwith:python setup.py install # or `develop`
Optional and needed only once after git clone:
-
install several pre-commit git hooks with:
pre-commit installand checkout the configuration under
.pre-commit-config.yaml. The-n, --no-verifyflag ofgit commitcan be used to deactivate pre-commit hooks temporarily. -
install nbstripout git hooks to remove the output cells of committed notebooks with:
nbstripout --install --attributes notebooks/.gitattributesThis is useful to avoid large diffs due to plots in your notebooks. A simple
nbstripout --uninstallwill revert these changes.
Then take a look into the scripts and notebooks folders.
- Always keep your abstract (unpinned) dependencies updated in
environment.yamland eventually insetup.cfgif you want to ship and install your package viapiplater on. - Create concrete dependencies as
environment.lock.yamlfor the exact reproduction of your environment with:For multi-OS development, consider usingconda env export -n health-tracking -f environment.lock.yaml--no-buildsduring the export. - Update your current environment with respect to a new
environment.lock.yamlusing:conda env update -f environment.lock.yaml --prune
This project has been set up using PyScaffold 3.2.3. For details and usage information on PyScaffold see https://pyscaffold.org/.