Inspiration

When we saw the theme “Creative Data Manipulation,” two of the suggested directions immediately stood out.

Lossy Humans compressing a dataset as aggressively as possible while preserving the ability to answer a set of queries. Our first thought was the Fourier transform. It’s the backbone of lossy compression everywhere: JPEG discards high-frequency visual detail the eye can’t resolve, MP3 discards frequencies the ear can’t hear. In both cases, the transform separates what matters from what doesn’t. We asked: what happens if you apply this to a non-orthodox domain, not images or audio, but human behaviour? Behavioural data is repetitive, noisy, and time-varying. It has periodicity. It should be compressible. And the interesting question isn’t just whether you can compress it, but what survives the compression, what the frequency domain reveals about a person that the raw data doesn’t.

Quantified Hackathon the idea of instrumenting human behaviour and building insight from the patterns. This pointed us toward metacognition: could you build a tool that tells someone something true about themselves that they didn’t already know? Not what they did, but how they did it - the structure beneath the output.

These two ideas converged around a personal experience. One of our team has ADHD. For years, every system that measured their work grades, attendance, weekly output said the same thing: inconsistent, needs better time management. But the reality was long sessions of deep, intense focus separated by days of nothing. The outcomes were acceptable. The process generating them was two standard deviations from the norm. No metric ever captured that. No clinician measured it. The qualitative experience of “I work differently” had no quantitative backing.

That’s when it clicked: the Fourier transform doesn’t just compress data. It decomposes behaviour into frequency components. And those components: the entropy of the spectrum, the dominant timescale, the pattern-to-noise ratio, the spectral slope map directly onto psychological traits that have only ever been described in words. Self-regulation. Temporal orientation. Behavioural flexibility. Internal versus external locus of control.

We weren’t compressing data to save space. We were compressing behaviour to reveal structure. The “lossy human” isn’t a metaphor, it’s a measurable signal, and the Fourier transform is the instrument that reads it.

What it does

Fourier Psychology takes a person’s GitHub commit history a stream of timestamped events spanning months of real behaviour and applies the Fourier transform to decompose it into its frequency components. From the resulting power spectrum, it extracts four metrics that each quantify a psychological trait that has historically been impossible to measure precisely:

Spectral Entropy $(H_n)$ quantifies how ordered vs. chaotic your behaviour is. Normalised Shannon entropy of the power spectrum:

$$H_n = \frac{-\sum p(f_k)\,\log_2 p(f_k)}{\log_2 N}$$

where $p(f_k) = P(f_k) / \sum P(f_k)$. A score near 0 means your behaviour is dominated by one strong repeating cycle (maximally ordered). A score near 1 means your behavioural energy is spread across all frequencies — effectively noise. This quantifies self-regulation: is your behaviour governed by internal rhythm or external chaos?

Spectral Centroid $(C_s)$ quantifies the timescale that governs your life:

$$C_s = \frac{\sum f_k \cdot P(f_k)}{\sum P(f_k)}$$

Converted to a period, this tells you your governing timescale the temporal resolution at which your behaviour is most structured. Some people are daily-governed (centroid ≈ 24h). Others operate on multi-day arcs (centroid ≈ 4-7 days) that no daily planner or daily standup accounts for. You cannot feel your own governing timescale. The Fourier transform reveals it.

Harmonic-to-Noise Ratio (HNR) quantifies how much of your behaviour is structured pattern versus random reaction:

$$HNR_{dB} = 10 \cdot \log_{10}\left(\frac{E_{harmonic}}{E_{noise}}\right)$$

where $E_{harmonic}$ is the energy concentrated at detected spectral peaks and $E_{noise}$ is everything else. High HNR means your behaviour is mostly self-generated pattern. Low HNR means noise dominates signal your actions are primarily driven by external events rather than internal rhythm. This is the quantitative answer to “am I in control of my own working pattern?”

Spectral Slope $(\beta)$ quantifies your dynamic flexibility by fitting the power-law exponent of your spectrum:

$$P(f) \propto \frac{1}{f^\beta}$$

$\beta \approx 1$ (pink noise) is the adaptive zone, the boundary between order and chaos where many healthy natural systems operate. Below 1: you’re over-reactive to short-term fluctuation. Above 1: you’re too rigid, too slow to adapt. This single number captures where you sit on the flexibility–rigidity spectrum.

These four metrics are then compared against a population baseline to compute a composite divergence score:

$$D = \sqrt{z_{entropy}^2 + z_{centroid}^2 + z_{HNR}^2 + z_{\beta}^2}$$

This is expressed in standard deviations. A $D$ of 2.0 means your behavioural structure is 2 standard deviations from the population average measurably, mathematically different from the assumed norm. This is the number the diagnostic system doesn’t compute. It doesn’t say “you have ADHD.” It says “your process is quantifiably atypical” and it tells you exactly how much and in which dimensions.

How we built it

The application is built in Python with Streamlit as the UI framework and Plotly for interactive visualisations.

Data ingestion: We pull timestamped GitHub events either from BigQuery’s GitHub Archive or via the public GitHub Events API (no OAuth required, just enter a username). Events are aggregated into uniform hourly bins, zero-filled to create a gapless time series suitable for spectral analysis.

Spectral engine: The core computation uses scipy.fft.rfft to transform the behavioural time series into the frequency domain. From the resulting power spectrum, we compute all four metrics:

  • Spectral Entropy via normalised Shannon entropy of the power distribution
  • Spectral Centroid as the weighted mean frequency
  • HNR via peak detection (power > $\mu + 2\sigma$) and energy partitioning
  • Spectral Slope via log-log linear regression on the power spectrum

Narrative engine: A deterministic, template-based interpretation system that translates each metric value into human-readable psychological insight. No LLM — every interpretation maps directly from the number to a specific, calibrated description.

Population baseline: Seeded from synthetic data (100 simulated developers with varied behavioural profiles) and calibrated against real team member data. Stores mean and standard deviation for each metric to enable z-score computation and divergence scoring.

Profile interface: A single-page Streamlit app displaying the power spectrum visualisation (with annotated dominant periods), the four metrics with interpretation text, the divergence score with per-dimension breakdown, and a supplementary temporal profile (hour-of-day and day-of-week patterns).

Challenges we ran into

The math had to be right, not just plausible. Early on, we had a version that classified people into archetypes “burst worker,” “steady builder,” “night owl.” It looked impressive but it was hollow. A bar chart of commits-per-hour tells you someone works at night. You don’t need a Fourier transform for that. We had to repeatedly challenge ourselves: what does the frequency domain reveal that the raw data doesn’t? This led us to the four spectral metrics, quantities that genuinely exist only in the frequency domain and genuinely map to psychological constructs.

Spectral Slope fitting is sensitive to noise at extreme frequencies. Very low and very high frequency bins in the power spectrum can distort the log-log regression that computes $\beta$. We had to carefully handle edge cases, zero-power bins producing $-\infty$ in log space, the DC component skewing the fit, and aliasing artefacts at the Nyquist frequency.

The interpretive text required precision, not creativity. We wanted the narrative engine to feel like a calm, intelligent explanation not a horoscope. Every threshold and every sentence had to be defensible. Writing text that is psychologically meaningful without crossing into clinical territory (we don’t diagnose we measure) was harder than writing the FFT code.

Calibrating the population baseline with limited real data. With only a few real GitHub accounts available, we had to seed the baseline from synthetic data and then validate that the synthetic distributions weren’t wildly different from real developers. This required iterating on the synthetic data generator to produce behaviourally realistic patterns rather than just mathematically convenient ones.

Not over-building. We started this hackathon with a much broader vision corporate team analysis, cross-domain signal correlation, multi-platform integration. The hardest decision was cutting all of that and focusing entirely on the individual spectral profile. Everything you see in the final product is the result of aggressive scoping not because we couldn’t imagine more, but because the core idea deserved to be built well rather than spread thin.

Accomplishments that we’re proud of

The four spectral metrics are real. They’re not invented buzzwords they’re established signal processing concepts (spectral entropy, spectral centroid, harmonic-to-noise ratio, spectral slope) applied to a novel domain. Each one has a precise mathematical definition, a clear psychological interpretation, and is computed directly from the Fourier transform. We didn’t cut corners on the math.

The divergence score fills a real gap. The composite divergence $D$ answers a question that no existing tool clinical or commercial currently answers: “How much does my behavioural structure differ from the population norm, and in which specific dimensions?” For people in the gap between “I feel different” and “I can prove I’m different,” this number matters.

We ran it on ourselves and it worked. The most validating moment of the hackathon was running the tool on our own GitHub data and seeing profiles that genuinely reflected how we work and how differently we work from each other. The spectral centroid, especially, revealed governing timescales we’d never articulated. One team member discovered they operate on a multi-day cycle, not a daily one. That’s a piece of self-knowledge that didn’t exist before this tool computed it.

The narrative engine is honest. It never says “good” or “bad.” It never diagnoses. It describes structure. Reading your own profile feels like someone understood how you work and explained it back to you without judgement. Getting that tone right precise, respectful, insightful is something we’re genuinely proud of.

What we learned

Compression reveals more than raw data. This was the foundational insight. A person’s GitHub history is thousands of events. The Fourier transform compresses all of that into a power spectrum, and four numbers extracted from that spectrum tell you more about how someone works than a spreadsheet of every commit they’ve ever made. The act of compression discarding noise, preserving structure is where the insight lives.

The frequency domain is psychologically meaningful. This was not obvious at the start. We knew the Fourier transform would decompose behaviour into periodic components. What we didn’t fully appreciate until we built it was that each property of the power spectrum (its entropy, its centroid, its peak-to-noise ratio, its slope) maps cleanly onto a specific psychological concept that clinicians and researchers have been trying to measure for decades using subjective methods. The math and the psychology converge and that convergence is what makes the project work.

Scoping is the hardest engineering problem. We started with a vision that spanned corporate analytics, cross-domain resonance detection, multi-platform integration, and population-level social behaviour modelling. We shipped a single-page profile for individual GitHub users. That reduction was the most important decision we made. A focused tool that does one thing with mathematical integrity beats a sprawling platform that does many things superficially.

Metacognition requires measurement, not just reflection. You can think about how you think all day and still not know your spectral entropy. The tool taught us literally, using our own data that self-knowledge has a ceiling without quantitative measurement. The Fourier transform raised that ceiling.

What’s next for Fourier Psychology

More data sources. The spectral engine takes one input: an array of timestamps. It doesn’t care where they come from. GitHub is our proof of concept. The same four metrics apply to Slack messages, Jira ticket updates, Google Calendar events, email send timestamps, or any other platform that records when a person does things. Each new data source adds a new dimension to the behavioural profile your coding rhythm, your communication rhythm, your meeting rhythm and the cross-source coherence between them is itself a rich signal. The architecture is already source-agnostic; only the ingestion adapters need to be built.

Longitudinal tracking. The most powerful version of this tool shows you how your four metrics change over time. A declining HNR means you’re losing internal structure becoming more reactive, less self-governed. A shifting spectral centroid means your governing timescale is changing. These trajectories answer the question “am I getting better or worse at regulating my own behaviour?” a question that currently has no quantitative answer.

Clinical supplementation. The divergence score was designed for a specific population: people who suspect they’re neurodivergent but don’t meet the diagnostic threshold for impairment. We want to explore whether spectral behavioural profiles can supplement clinical assessment not replace it, but provide the kind of objective, quantitative behavioural evidence that the diagnostic process currently lacks. A person shouldn’t have to fail before they get measured.

From individuals to populations. If you can compute a spectral profile for one person, you can compute it for a million. Aggregating individual spectral metrics across a population tracking the distribution of entropy, HNR, spectral centroid, and spectral slope over time would provide a bottom-up, assumption-free method for detecting transitions in collective psychology. Rather than starting with a top-down narrative (“society seems more anxious”) and gathering survey data to support it, you measure individual behavioural structure, aggregate, and let the collective pattern emerge from the data. Population-level HNR trends could quantify the “attention crisis.” Distributional shifts in spectral entropy could detect social fragmentation. Centroid migration could track whether a society is collectively shortening its time horizons. The Fourier transform applied to behaviour at scale could open an entirely new domain of quantitative social science — mass psychology measured from the bottom up, built on individual metrics rather than large-scale subjective assumptions.

Built With

Share this project:

Updates