Getting Started#
Smart Health#
Overview#
Smart Health is a research initiative collecting smartphone and wearable data from up to 10,000 consenting participants over five years (sponsored by the University of Sheffield). This project aims to link this data to NHS records via the local Subnational Data Environment for Yorkshire and Humber.
This repository provides the pipeline to process raw data received from Daiser and build a structured database for future Smart Health research projects, ensuring data from various devices is stored securely and is accessible for linkage and analysis.
Setup#
Prerequisites#
uv: The Python package installer. See the official installation guide for setup.Git: For version control.
7zipfile archiver. Ensure not to use the obsoletep7zipport. On Linux, runsudo apt install 7zip.
Installation Steps#
Clone the Repository:
git clone git@github.com:Data-Connect-UoS/BHF-SmartHealth.git cd BHF-SmartHealth
Install Dependencies: Use
uv syncto install the project’s core runtime dependencies.Install pre-commit Hooks: Run
uv run pre-commit installto install the project’s pre-commits hooks.
Running Data Pipelines (Snakemake)#
This project uses Snakemake to execute the data processing pipelines.
Prerequisites#
Ensure you have installed all dependencies using
uv sync.You must create a configuration file named
secrets.yamlin theworkflow/config/directory. This file must contain the necessary URLs and keys for accessing the S3 data buckets. An example structure is provided inworkflow/config/example_secrets.yaml.
Available Pipelines#
The following Snakemake workflow files are available within the workflow/ directory:
Pipeline File |
Description |
Output |
|---|---|---|
|
Processes raw Fitbit device data (daily summary and intraday). |
Summarised binary files |
|
Processes raw GPS data. |
Summarised LSOA and Mobility binary files |
Dry Run (Testing)#
Perform a dry run to test the pipeline logic, check file dependencies, and identify potential errors without executing any steps:
uv run snakemake -s workflow/<PipelineFile> --dryrun
Execution#
To execute a pipeline, use the –cores flag to specify parallelism. If no value is specified, Snakemake will automatically use the number of available CPU cores.
uv run snakemake -s workflow/<PipelineFile> --cores
Contributing and Developer Guides#
The project documentation is built using Sphinx, with API reference documentation automatically generated from Python docstrings using sphinx-autoapi.
A CI/CD workflow automatically builds and deploys the documentation in main to GitHub Pages.
For all development standards, including:
Detailed local documentation build steps
Coding standards (Ruff, formatting)
The full list of automated CI/CD checks (linting, testing, cleansing)
Please consult the dedicated CONTRIBUTING.md document.