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
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
-
Set up the PostgreSQL instance with the sample datasets
-
Clone repository:
git clone https://github.com/USC-InfoLab/w4h-icde-demo.git
-
Configure access to your Postgres instance:
cd conf cp config.yaml.example config.yaml #configure with your Postgres database information
-
Build Docker Image::
docker build -t uscimsc/w4h:icde-demo .
-
Create and configure
config.yaml
to access your Postgres database instance:cd ./conf cp config.yaml.example config.yaml #configure with your Postgres database information
-
Run the Container: To start a container from the image, use the following command:
cd w4h-icde-demo
#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
The following instructions are provided for Mac ONLY!
- Install PostgreSQL
- Start
Postgres.app
server - Verify the installation running
pg_config --version
- Verify the connection with
pgAdmin
:
host: localhost
port: 5432
maintenance database: postgres
user: postgres
password: postgres
- Setup the database?
- Install Required Packages:
From the project directory activate the venv
and install the necessary packages using pip
:
source venv/bin/activate
pip install -r requirements.txt
- Stream Simulation:
Start the stream simulation service, run the following command:
python stream_sim.py
- Start the Dashboard:
After the stream simulation service is up and running, initiate the dashboard using streamlit
:
streamlit run viz.py
Once the dashboard is started, you can access it via the URL provided by streamlit
in your terminal.
-
Load sample data:
Follow the getting started?
- Download synthetic_subject_data.csv