Frequency-Based Time Visualization: A Rigorous Mechanics Specification research

Executive Summary

This report proposes a mathematically rigorous system for converting discrete calendar events into continuous frequency-domain representations, enabling "beat frequency" visualization of temporal patterns. The core insight is that calendar data can be treated analogously to neural spike trains—discrete point events that can be convolved with kernels to produce continuous intensity functions, then decomposed via spectral analysis to discover natural rhythms. The system combines kernel density estimation for signal construction, FFT/wavelet analysis for frequency discovery, queuing theory for capacity modeling, and chronobiology-inspired rhythm hierarchies for meaningful interpretation.

1. Problem Formulation

The Naive Approach (Current State)

Current prototype ASSIGNS frequencies arbitrarily (weekly = 7-day sine wave). This ignores actual event patterns and creates meaningless visualizations.

The Correct Approach

DISCOVER frequencies from actual calendar data using signal processing techniques. Transform: Calendar Events -> Continuous Signal -> Frequency Spectrum -> Meaningful Insights

Core Questions Answered

2. Biological Rhythm Hierarchy

Chronobiology provides the conceptual framework for understanding human temporal patterns. Three rhythm classes exist:

TypePeriodCalendar Analog
Ultradian<24hMeeting blocks, focus sessions, breaks
Circadian~24hDaily work pattern, sleep/wake
Infradian>24hWeekly sprints, monthly reviews, quarterly planning

These rhythms interact hierarchically—circadian clocks regulate ultradian oscillations, and infradian cycles modulate circadian patterns.

3. Data Model: Calendar to Signal Transformation

Stage 1: Event Representation

Each calendar event becomes a structured object:

{
  id: string,
  start: timestamp,
  end: timestamp,
  duration: minutes,
  type: EventType,
  energy_cost: 0-1,    // cognitive load
  flexibility: 0-1,    // can it move?
  recurrence: Pattern | null
}

Stage 2: Event Types & Signatures

Different events have different "shapes":

TypeShape
MeetingRectangular pulse
Deep WorkTrapezoidal (ramp up/down)
DeadlineExponential buildup
AdminLow-amplitude uniform
TravelFixed buffer (shadow)

Stage 3: Shadow Events

Events have temporal "shadows"—implicit time costs:

  • Pre-shadow: Prep time, context loading
  • Post-shadow: Recovery, context switching
  • Travel shadow: Transit between locations

Shadow duration scales with event energy cost and type.

4. Signal Construction: Kernel Density Estimation

Calendar events are analogous to neural spike trains—discrete point events in time. We use kernel density estimation (KDE) to convert them into continuous intensity functions.

The Core Formula

$$\lambda(t) = \sum_{i=1}^{N} w_i \cdot K_{\sigma}(t - t_i) \cdot D_i(t)$$

Where:

  • $\lambda(t)$ = load intensity at time $t$
  • $w_i$ = event weight (energy cost)
  • $K_{\sigma}$ = kernel function with bandwidth $\sigma$
  • $t_i$ = event center time
  • $D_i(t)$ = duration mask function

Kernel Selection

KernelUse CaseProperties
RectangularMeetings, fixed blocksSharp boundaries, no spillover
GaussianFlexible events, deadlinesSmooth, captures uncertainty
TrapezoidalDeep work sessionsRamp-up and ramp-down
ExponentialDeadlinesAsymmetric, builds pressure

Duration Handling

For events with duration (not point events), we use a convolution of the kernel with a rectangular pulse:

$$D_i(t) = \begin{cases} 1 & \text{if } t_{\text{start},i} \leq t \leq t_{\text{end},i} \\ 0 & \text{otherwise} \end{cases}$$

The amplitude represents "energy cost per unit time." A 3-hour meeting with energy_cost=0.8 contributes $0.8$ to the load intensity for its entire duration, plus shadow contributions before and after.

5. What the Y-Axis Represents

Option A: Time Commitment basic

Y = hours committed per unit time (density). Simple but ignores cognitive variation.

$$\lambda(t) = \sum_i D_i(t)$$

Max theoretical = 1.0 (100% scheduled)

Option B: Cognitive Load recommended

Y = weighted cognitive demand. Accounts for event intensity and type.

$$\lambda(t) = \sum_i w_i \cdot D_i(t)$$

Allows "overload" > 1.0 for high-demand periods

Option C: Capacity Remaining actionable

Y = available capacity after scheduled load.

$$C(t) = C_{\max}(t) - \lambda(t)$$

Where $C_{\max}(t)$ varies by time of day (circadian rhythm)

6. Frequency Discovery via Spectral Analysis

Fourier Transform Approach

Apply FFT to the continuous load signal to extract frequency components:

$$\hat{\lambda}(f) = \int_{-\infty}^{\infty} \lambda(t) \cdot e^{-2\pi i f t} \, dt$$

Peaks in $|\hat{\lambda}(f)|$ reveal dominant periodicities. Expected discoveries:

  • $f = 1/7$ days$^{-1}$ — weekly cycle
  • $f = 1/1$ days$^{-1}$ — daily cycle
  • $f = 1/14$ days$^{-1}$ — biweekly patterns
  • $f = 1/30$ days$^{-1}$ — monthly rhythms

Wavelet Transform Approach advanced

For non-stationary patterns (rhythms that change over time), use wavelet analysis:

$$W(a, b) = \frac{1}{\sqrt{a}} \int \lambda(t) \cdot \psi^*\left(\frac{t-b}{a}\right) dt$$

Provides time-frequency localization. Can detect:

  • When patterns emerge or disappear
  • Seasonal variations in workload
  • Transient stress periods
  • Phase shifts in daily rhythms

Autocorrelation for Hidden Cycles

Autocorrelation reveals periodicities even in noisy data by measuring signal similarity at different time lags:

$$R(\tau) = \frac{1}{T} \int_0^T \lambda(t) \cdot \lambda(t + \tau) \, dt$$

Peaks in $R(\tau)$ indicate cycle lengths. Useful for discovering patterns you didn't know existed (e.g., "your stress peaks every 11 days").

7. The Interference Model: What Happens When Rhythms Collide

Beat Frequency Mathematics

When two periodic patterns with frequencies $f_1$ and $f_2$ combine:

$$f_{\text{beat}} = |f_1 - f_2|$$

For calendar rhythms, this predicts "alignment moments"—when multiple cycles constructively interfere:

  • Weekly meeting + monthly review = beat every ~5 weeks
  • Biweekly sprint + quarterly deadline = alignment points

Constructive interference = overload. Destructive = cancellation (rare in calendars since events don't "cancel" each other).

Superposition vs. Saturation

Pure superposition: $\lambda_{\text{total}}(t) = \sum_i \lambda_i(t)$

But humans have capacity limits. Use a saturation function:

$$\lambda_{\text{effective}}(t) = C_{\max} \cdot \tanh\left(\frac{\lambda_{\text{total}}(t)}{C_{\max}}\right)$$

Or apply queuing theory: when load approaches capacity, "queue depth" (backlog) grows nonlinearly. Response time degrades according to:

$$W = \frac{\rho}{1 - \rho}$$

where $\rho = \lambda / \mu$ (utilization). At 90% utilization, wait time explodes.

8. Capacity Modeling: Queuing Theory Integration

Little's Law

$$L = \lambda \cdot W$$

Average items in system = arrival rate x time in system. For calendars: Backlog = Task arrival rate x Time to complete.

Utilization

$$\rho = \frac{\lambda}{\mu}$$

Load divided by capacity. $\rho > 1$ means unsustainable—queue grows without bound.

Response Time

$$R = S \cdot \frac{1}{1 - \rho}$$

Service time scaled by utilization factor. Explains why everything feels harder when overloaded.

Practical Capacity Model

capacity_model = {
  // Daily capacity varies by circadian rhythm
  base_capacity: 8,  // hours of productive work

  // Circadian multiplier (0-1) by hour of day
  circadian_curve: [0.2, 0.1, 0.05, ...],  // midnight-6am low

  // Cognitive load degradation over time
  fatigue_factor: t => 1 - 0.02 * hours_worked(t),

  // Recovery rate during breaks
  recovery_rate: 0.15  // per 15-min break
}

9. Meaningful Outputs & Insights

Beat Prediction warning

"All your major cycles align in 3 weeks."

Algorithm: Find LCM of detected periods, predict next alignment. Score by combined amplitude.

Trend Detection core

"Your weekly load has increased 15% over past month."

Algorithm: Linear regression on weekly load averages. Alert on significant slopes.

Pattern Discovery discovery

"You have a hidden 14-day stress cycle."

Algorithm: Autocorrelation peaks + spectral analysis. Surface unexpected periodicities.

Capacity Forecast actionable

"18 hours of slack before overload this week."

Algorithm: Integrate $(C_{\max}(t) - \lambda(t))$ over forecast window.

Rhythm Health Score advanced

"Weekly pattern regularity: 72% (high variance)."

Algorithm: Measure phase consistency of weekly signal. High variance = irregular schedule.

Burnout Risk warning

"Utilization has exceeded 85% for 3 consecutive weeks."

Algorithm: Track rolling utilization. Alert when sustained high load detected.

10. Implementation Algorithm

// STEP 1: Ingest calendar events
function ingestCalendar(events: CalendarEvent[]): LoadSignal {
  const resolution = 15 * 60 * 1000;  // 15-minute bins
  const signal = new Float32Array(timeRange / resolution);

  for (const event of events) {
    const weight = computeWeight(event);
    const kernel = selectKernel(event.type);
    const shadows = computeShadows(event);

    // Add main event
    applyKernel(signal, event.start, event.end, weight, kernel);

    // Add shadows
    for (const shadow of shadows) {
      applyKernel(signal, shadow.start, shadow.end, shadow.weight, kernel);
    }
  }

  return signal;
}

// STEP 2: Frequency analysis
function analyzeFrequencies(signal: LoadSignal): FrequencySpectrum {
  // Apply FFT
  const fft = new FFT(signal.length);
  const spectrum = fft.forward(signal);

  // Find peaks
  const peaks = findPeaks(spectrum, {
    minHeight: 0.1,
    minDistance: 1  // at least 1 day apart
  });

  // Identify known rhythms
  const rhythms = peaks.map(peak => ({
    frequency: peak.frequency,
    amplitude: peak.amplitude,
    period: 1 / peak.frequency,
    type: classifyRhythm(1 / peak.frequency)  // daily, weekly, etc.
  }));

  return { raw: spectrum, rhythms };
}

// STEP 3: Compute interference
function predictInterference(rhythms: Rhythm[]): BeatPrediction[] {
  const beats = [];

  for (let i = 0; i < rhythms.length; i++) {
    for (let j = i + 1; j < rhythms.length; j++) {
      const beatFreq = Math.abs(rhythms[i].frequency - rhythms[j].frequency);
      const beatPeriod = 1 / beatFreq;
      const amplitude = rhythms[i].amplitude * rhythms[j].amplitude;

      beats.push({
        sources: [rhythms[i], rhythms[j]],
        period: beatPeriod,
        nextPeak: findNextPeak(beatPeriod),
        severity: amplitude
      });
    }
  }

  return beats.sort((a, b) => b.severity - a.severity);
}

// STEP 4: Capacity analysis
function analyzeCapacity(signal: LoadSignal, capacity: CapacityModel): CapacityReport {
  const utilization = [];
  const slack = [];

  for (let t = 0; t < signal.length; t++) {
    const cap = capacity.atTime(t);
    const load = signal[t];

    utilization.push(load / cap);
    slack.push(Math.max(0, cap - load));
  }

  return {
    avgUtilization: mean(utilization),
    peakUtilization: max(utilization),
    totalSlack: sum(slack),
    burnoutRisk: utilization.filter(u => u > 0.85).length / utilization.length
  };
}

11. Edge Cases & Handling

Edge CaseProblemSolution
Recurring events with exceptionsBase pattern vs actualExpand recurrence, apply exceptions, then analyze
All-day eventsDuration ambiguousClassify as "background load" with low weight, spread over working hours
Tentative vs confirmedUncertainty in scheduleWeight tentative at 0.5x; use probabilistic model
Travel timeImplicit time costAdd shadow events based on location delta or explicit travel blocks
Energy vs time1hr meeting != 1hr deep workEnergy multipliers by event type (meetings = 1.2x, admin = 0.6x)
Context switchingFragmentation costAdd 10-min shadow between different-type events
Empty calendarNo signal to analyzeReturn baseline rhythms from historical data or defaults
Sparse dataFFT needs densityUse wavelet analysis; interpolate gaps

12. Visualization Strategy

Time Domain View

X-axis: Time (hours/days/weeks). Y-axis: Load intensity. Show:

  • Raw signal as filled area
  • Capacity line as overlay
  • Slack as inverse fill
  • Event types as color layers

Frequency Domain View

X-axis: Period (log scale). Y-axis: Amplitude. Show:

  • Power spectrum as bar/line chart
  • Annotated peaks with period labels
  • Reference lines for common rhythms
  • Beat frequencies as secondary markers

The 3D Interference Visualization

The original "beat frequency" concept as a 3D surface: X = time, Y = frequency component, Z = amplitude. Interference patterns appear as ridge lines where multiple frequencies constructively combine. This is essentially a spectrogram or scalogram visualization.

13. Prior Art & References

Time Tracking Tools

RescueTime: Automatic tracking, classifies apps as productive/distracting. No frequency analysis.

Toggl: Manual tracking, project-based. Good for billing, not pattern discovery.

Microsoft Viva: Calendar analytics for burnout detection. Uses simple heuristics (overtime, meeting hours).

Academic Research

Chronobiology: Mathematical models of circadian rhythms using ODEs and coupled oscillators.

Spike Train Analysis: Kernel density estimation for neural firing rates—directly applicable methodology.

Queuing Theory: Well-established capacity planning frameworks from operations research.

Signal Processing

FFT: O(n log n) frequency decomposition. Standard in DSP libraries.

Wavelets: Time-frequency localization. Good for non-stationary calendar patterns.

Autocorrelation: Hidden periodicity detection. Robust to noise.

Sources

  1. Mathematical modeling of circadian rhythms — PMC/NIH, 2019
  2. Kernel bandwidth optimization in spike rate estimation — PMC/NIH, 2010
  3. The Times of Our Lives: Interaction Among Different Biological Periodicities — Frontiers in Integrative Neuroscience, 2018
  4. Little's Law — Wikipedia
  5. Beat (acoustics) — Wikipedia
  6. Why Capacity Planning Needs Queueing Theory — HackerNoon
  7. Periodicity: Detecting Rhythms in Data — Let's Data Science
  8. Find Periodicity Using Autocorrelation — MATLAB Documentation
  9. Wavelet Transform: A Practical Approach to Time-Frequency Analysis — Medium
  10. Unraveling the interplay between mental workload, occupational fatigue, physiological responses and cognitive performance — Nature Scientific Reports, 2024
  11. Outlook Calendar Analytics: The Hidden Driver of Productivity — Worklytics
  12. Leveraging Machine Learning for Predictive Workload Management to Combat Employee Burnout — ResearchGate
  13. Superposition and Interference — Lumen Physics
  14. An introduction to smoothing — Matthew Brett Tutorial

14. Next Steps for Implementation

  1. Build signal construction module — Implement KDE with multiple kernel types
  2. Integrate FFT library — Use fft.js or similar for browser-based analysis
  3. Create capacity model — Define circadian curves and fatigue factors
  4. Design visualization layer — Time domain, frequency domain, and 3D spectrogram views
  5. Connect to calendar API — Google Calendar, Outlook, iCal import
  6. Build insight engine — Implement beat prediction, trend detection, burnout risk algorithms
  7. User testing — Validate that discovered patterns match user intuition