Follow this README to set up the W4H ICDE demonstration. Refer to W4H Toolkit Demonstration Scenario for running the demo.
The Wearables for Health (W4H) Toolkit is a suite of Open Source tools for managing, analyzing, and visualizing wearable data used in health applications. The Toolkit leverages a novel Geospatial Multivariate Time Series (GeoMTS) abstraction, which enables streamlined management and analysis of wearable data. The ICDE Demo provides a preview of the following W4H Toolkit components:
- StreamSim: A real-time data streaming simulator tool for tabular data.
- W4H ImportHub: A gateway to ingesting datasets.
- pyGarminAPI: A Python library to interact with the Garmin API.
- Analytics Dashboard: Dashboard demonstrating the W4H capabilities
See also the W4H Toolkit for Acquisition, Storage, Analysis and Visualization of Data from Wearable Devices video demonstration.
You can run the demo in 3 different ways:
- DockerHub image (easiest)
- Building a Docker image
- From code base
For this you will need a Postgres database loaded with sample data.
- Set up the PostgreSQL instance with the sample datasets
- In Docker download the
w4h:icde-demo
image from DockerHub - Configure access to your Postgres instance:
mkdir icde-demo
cd icde-demo
mkdir conf
cd conf
wget https://raw.githubusercontent.com/USC-InfoLab/w4h-icde-demo/refs/heads/main/config/config.yaml.example
cp config.yaml.example config.yaml #configure with your Postgres database information
-
Run the container:
docker run -dp 8501:8501 -v ${PWD}/conf:/app/conf uscimsc/w4h:latest
#build the image
docker build -t uscimsc/w4h:icde-demo .
#run the container
docker run -dp 8501:8501 -v ./conf:/app/conf uscimsc/w4h:icde-demo
#run in interactive mode for debugging XXX: dashboard not working with this
docker run -it -p 8501:8501 -v ./conf:/app/conf uscimsc/w4h:icde-demo /bin/zsh
XXX: upload image to docker
The following instructions are provided for Mac ONLY!
- Start
Postgres.app
server- Verify the installation running
pg_config --version
- Verify the connection with
pgAdmin
- Verify the installation running
host: localhost
port: 5432
maintenance database: postgres
user: postgres
password: postgres
- Start the dashboard
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python stream_sim.py&
streamlit run viz.py #starts at: http://localhost:8501/
- Load the data:
- Login in the dashboard as 'admin' with password 'admin' (ignore errors if any)
- Open ImportHup
- Select 'Create new W4H database instance' and create 'demo' database clicking 'Create'. You should see a confirmation
Database 'demo' created!
- Under 'Choose existing W4H database instance' and 'Select an existing database', choose 'demo'
- Under 'Choose a CSV file' click 'Browse files', and select synthetic_subject_data.csv, check 'Populate subject table?', click 'Populate Database'. You should see a confirmation 'Database populated!'.
- Under 'Choose a CSV file' click 'Browse files', upload synthetic_timeseries_data.csv, uncheck 'Populate subject table?', scroll down and click 'Populate Database'. Be patient this step takes some time!