Analytics dashboard for wearable sensor data from the DIWAH study at LNU. Visualizes accelerometer, heart rate, and other physiological signals from multiple subjects across different conditions (activity vs rest).
If you received a backup of the InfluxDB data, follow these steps to set up and run the dashboard on your machine.
- Download and install InfluxDB OSS v2
- Start InfluxDB:
Or if using the provided
influxd
docker-compose.yml:docker compose up -d influxdb
- InfluxDB UI will be available at:
http://127.0.0.1:8086
-
Stop InfluxDB if it's running:
taskkill /F /IM influxd.exeOr for Docker:
docker compose down
-
Extract the backup you received (e.g.,
manual_backup_20251202.zip) -
Copy the backup to the InfluxDB data folder:
xcopy /E /I manual_backup_20251202 influxdb-data -
Start InfluxDB again:
influxd
Or Docker:
docker compose up -d influxdb
- Open InfluxDB UI:
http://127.0.0.1:8086 - Login with credentials provided (default:
admin/admin12345) - Go to Data → API Tokens
- Click Generate API Token → All Access Token
- Copy the token (you'll need it in the next step)
-
Clone or extract the dashboard repository
-
Create a virtual environment:
python -m venv .venv
-
Activate the environment:
.venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the project root:notepad .env
-
Add your configuration (replace
<YOUR_TOKEN>with the token from Step 3):INFLUX_URL=http://localhost:8086 INFLUX_TOKEN=<YOUR_TOKEN> INFLUX_ORG=diwah INFLUX_BUCKET=wearables -
Save and close
Option A: Run directly with Python
python src\analytics_dashboard.pyOption B: Run with Docker Compose (Recommended)
docker compose upThe dashboard will start at: http://localhost:8050
Open it in your browser and select a subject and condition to view the data.
The project includes a docker-compose.yml file that runs both InfluxDB and the dashboard in containers.
- Docker and Docker Compose installed
- A
.envfile in the project root (see Step 5 above)
-
Create a
.envfile in the project root with your InfluxDB configuration:INFLUX_TOKEN=your-token-here INFLUX_ORG=diwah INFLUX_BUCKET=wearables INFLUX_USERNAME=admin INFLUX_PASSWORD=admin12345 -
Start all services:
docker compose up
-
Access the dashboard at
http://localhost:8050- The dashboard is accessible from your host machine
- InfluxDB UI is available at
http://localhost:8086
-
Stop services:
docker compose down
The dashboard container automatically reads environment variables from the .env file and connects to the InfluxDB container.
- Time Series Visualization: Raw and 5-second aggregated sensor data
- Statistical Analysis: Descriptive stats, correlations, data quality metrics
- Activity vs Rest Comparison: T-tests and Cohen's d effect sizes
- Multi-subject Support: Filter by subject ID and condition
- Responsive UI: Three-column layout with KPI cards and interactive plots
-
Actigraph file:
- Has 11 header lines with metadata
- Timestamp format: "2024-05-14 09:41:01"
- Columns: timestamp, x, y, z
- Uses commas as decimal separators (European format!)
-
Bangle file:
- No header
- Timestamp is delta time in milliseconds
- Columns: Time, Acc_x, Acc_y, Acc_z, HRM_r, HRM_f, PPG_r, PPG_o
- Time accumulates (20, 80, 80, 80...)
-
EmotiBit file:
- Complex format with multiple sensor types mixed together
- Variable number of columns
- Timestamp in filename + packet timestamps
- Columns: local_timestamp, emotibit_timestamp, data_length, type_tag, ...
- Actigraph: Has absolute timestamps → used as reference
- Bangle: Cumulative milliseconds → aligned to reference
- EmotiBit: Filename timestamp + relative time → aligned to reference