I need a drink

Between work and leisure, I spend a fair amount of time modifying my energy, attention, and mood with (legal, acceptable) substances. This appears to be a pillar of many adults’ routines.

Started September 2018, (when I started my first full-time job after graduation,) for one year I noted every coffee and alcoholic drink I had by the hour in which it was mostly consumed.

(This timing and what amount constitutes "one drink" is fungible. This is soft and round personal data.)

I wanted to see a heatmapped routine of the ways I push and pull into focus, attention, and candor.

How does code display this?

TL;DR: D3.js in a Google Apps script combing through a Google Sheet, embedded here with an IFrame.

This page is written from scratch in simple html, uploaded as a repository to my Github and displayed like this using the Pages feature. The heatmap page sits inside an IFrame on this page. (IFrames, or inline frames, are essentially 'holes' in webpages that display another independent page.)

The heatmap is being drawn by a web app—a published script attached to a Google Sheets spreadsheet. The spreadsheet is two columns: every hour as a datetime value, and next to it, an o if a coffee drink was consumed, an x if an alcoholic drink was consumed. (Other values are error-coded to display as neon green dots, in case I enter an unrecognized value into that second column, I’ll really know.)

The dots’ placements are calculated horizontally by hour, and vertically by day since I started tracking. In this one-week view, each week is layered, as each day rolls around each week and overlaps—a textbook example of modular arithmetic intuition.

The opacity of each dot is 100% divided by the number of weeks since I’ve started tracking, until today. As weeks pass, each drink contributes less and less of a mark, and the aggregate becomes more impressionistic. Edit: since I've stopped noting, dot opacity is locked at 1/52.

What did I see new?

I most consistently drink coffee at 8am on weekdays. (Usually, the first thing I do when I get into work is make a pot for the office.) I usually have another in the next two hours, and sometimes a pick-up in the early afternoon. I was expecting to see a browner concentration on Mondays, but it looks like I stay pretty consistent. On weekends, I sleep in and often make some at home. Or on Saturdays, I'll visit a local shop that has free refills.

Friday after-work happy hours have become a tradition, and it's made its mark. Otherwise I'll have a drink around 8 or 9 most weeknights.

I've also made drink choices self-conscious of this project—even if I'm up early, I'll wait 'til 8 to drink coffee to keep that neat left edge. Similarly, even if I'm out late, I'll stop drinking before midnight to prevent rollover. Both these choices, though made in the aesthetic interest of this data visualization, are probably better for my body. (If you look closely, you might see a beer at 11am on a Friday. I was the best man in a wedding.)

When I started recording, I was imagining more overlap—an occasional eye-opener or some midnight oil—and the coffee and wine colors would blend into unexpected mixtures. Maybe it's best that my pushes and pulls remain in their expected times of day.