PROJECT 03 • DAY 11 OF 90 • BEHAVIORAL ANALYTICS

DAYBALANCE
HABIT SCIENCE.

A privacy-first personal behavioral analytics workspace transforming habit check-ins into empirical self-experiments — pairing schedule-aware streaks with Pearson and Spearman rank correlations across sleep, study, mood, and energy.

Python 3.12Streamlit 1.66Pandas & NumPyPlotly 7.1SQLite WAL33/33 Pytest
DayBalance Preview
CORRELATION MATH
Pearson r & Spearman ρ
PYTEST VERIFIED
33 / 33 Passed
9 Views
Multipage Analytics Hub
n >= 7 Guard
Anti-Hallucination Stat Gate
A/B Engine
Hypothesis Experiments
33 / 33
Pytest Suite Passed
01 / Overview

EMPIRICAL PERSONAL ANALYTICS WITHOUT CLOUD TRACKERS.

Generic habit apps break streaks on scheduled rest days and hallucinate generic pep talks. DayBalance respects non-daily schedules and validates lifestyle correlations mathematically.

01

Schedule-Aware Streaks

Supports daily, weekday, weekend, and custom frequencies plus protected rest days without breaking earned streaks.

02

Pearson & Spearman Engine

Computes bivariate Pearson r and Spearman rho rank correlations across sleep, study minutes, mood, and energy.

03

Sample-Size Guard (n >= 7)

Blocks spurious trend claims when sample size is insufficient and displays honest non-causal caveats.

04

A/B Habit Experiments

Run structured baseline vs intervention trials (e.g., morning walk impact on afternoon deep-work focus).

05

Built-in Focus Timer

Integrated Pomodoro deep-work timer that automatically logs completed focus sessions directly to daily lifestyle metrics.

06

Multi-Profile SQLite WAL

Composite uniqueness constraints, idempotent migrations, Light/Dark themes, and zero external API calls.

02 / Architecture

HOW IT WORKS.

Modular separation across Streamlit presentation views, pure-Python statistical services, and SQLite WAL persistence.

STAGE 01

Daily Check-In

Sub-2-min habit & lifestyle capture.

→
STAGE 02

Streak Engine

Schedule & rest-day aware evaluation.

→
STAGE 03

Stat Engine

Pearson r, Spearman ρ & OLS fit.

→
STAGE 04

A/B Evaluator

Baseline vs experiment comparison.

→
STAGE 05

Plotly UI

9 views across Dark & Light themes.

03 / Screenshots

APPLICATION SCREENSHOTS.

Live screens captured from the running application. Click any image to view full size, or follow setup instructions in the GitHub repository.

04 / Technical Details

STATISTICAL & BEHAVIORAL VERIFICATION.

Key modules, rules, safety checks, and automated test results documented in the repository.

Engine Module Methodology Verified Output
Correlation Explorer Pearson r + Spearman ρ + OLS trendline Blocked unless n >= 7 valid pairs
Streak Calculator Frequency masks + rest-day grace logic Zero false streak resets
Measurement Types Boolean, duration, count & numeric targets Flexible Morning/Evening routines
Automated Testing Unit & integration suite via pytest 33 / 33 Passed (100%)
05 / Tech Stack

CORE TECHNOLOGIES.

Frameworks, databases, visualization tools, and testing libraries used in DayBalance.

WEB FRAMEWORK
Streamlit 1.66
ANALYTICS MATH
Pandas • NumPy
CHARTING ENGINE
Plotly 7.1
DATABASE
SQLite 3 (WAL Mode)
TESTING
Pytest (33/33 Passed)
ARCHITECTURE
Service-Repository Pattern
06 / Next Steps

FUTURE ENHANCEMENTS.

Upcoming improvements planned for DayBalance.

Unsupervised K-Means clustering of lifestyle days after 90+ logged entries.
Standard .ics calendar feed export for scheduled habit routines.
Native Windows toast notifications for habit check-in windows.
Wearable CSV step and heart-rate sleep stage importers.
Weekly automated Markdown personal retrospective generator.
Encrypted ZIP backup & restore across workstation migrations.
OPEN-SOURCE PROJECT • GITHUB.COM/RAGURAMRRP

EXPLORE SOURCE & DOCS.

View the complete codebase, sample datasets, quick-launch scripts, and automated test suites on GitHub.