Analytics dashboard for validating wearable sensor data against indirect calorimetry ground truth.
Compares accelerometer data from consumer devices (Bangle.js, EmotiBit) against research-grade Actigraph and metabolic measurements.
git clone <repository-url>
cd diwah-intelligent-wearable-dashboard
# Create virtual environment
python -m venv venv
# Activate (Windows PowerShell)
.\venv\Scripts\activate
# Activate (macOS/Linux)
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtcp .env.example .envDefault .env works for local development:
INFLUX_URL=http://localhost:8086
INFLUX_TOKEN=<your-token>
INFLUX_ORG=diwah
INFLUX_BUCKET=wearables
docker-compose up -d influxdbOption A: Import from backup
python scripts/import_influx_data.py <backup-folder>Option B: Ingest from aligned CSV files
# Ingest pre-aligned data from output/aligned/
python scripts/ingest_aligned_data.py
# Verify
python scripts/verify_influx.pypython run_dashboard.pyOpen: http://127.0.0.1:8050
python scripts/import_influx_data.py <backup-folder>python scripts/verify_influx.py├── src/
│ ├── analytics_dashboard.py # Main Dash application
│ ├── backend/ # Data loaders, parsers, correlation
│ ├── frontend/ # UI components, visualizations
│ └── config.py # Configuration
├── scripts/
│ ├── ingest_aligned_data.py # Ingest pre-aligned CSVs to InfluxDB
│ ├── export_influx_data.py # Export to Line Protocol backup
│ ├── import_influx_data.py # Import from backup
│ ├── verify_influx.py # Database verification
│ └── reset_influxdb.py # Wipe and recreate bucket
├── output/aligned/ # Pre-processed aligned data (5s epochs)
├── diwah-anonymized/ # Raw sensor data (not in git)
├── influxdb-backups/ # Data backups
└── docs/ # Documentation
- Raw Data (
diwah-anonymized/) → Actigraph, Bangle, EmotiBit, Calorimetry files - Alignment (
src/backend/alignment.py) → Synchronize timestamps, 5s resampling - Output (
output/aligned/) → Pre-aligned CSVs per subject/device - Ingestion → Load to InfluxDB with subject/device/session tags
- Dashboard → Query InfluxDB, visualize correlations
- Participant Mapping — ID reference
- Alignment Pipeline — Synchronization logic
- Correlation Report — Validation results
