Publishing Productivity 2.0

As the second blog post on Spatial Awareness, I’d like to introduce what’s on the Productivity page of the site as of 6/4/19. This is a slightly updated version of another  blog post published on 3/5/19. If I update the productivity page again I will keep with this pattern of documentation as to trace its evolution through time.

There’s an almost overwhelming variety of productivity oriented software available, with many sharing common features. I choose to use Taskwarrior despite it having a steeper learning curve and nonexistent marketing budget. I appreciate being able to manage my to-do list directly from the terminal instead of having to use a GUI. Also, while most of Taskwarrior’s alternatives offer their own API’s, Taskwarrior benefits from being especially interoperable, allowing one to customize usage to their specific objectives.

In this case, my objective is to impose some regimentation and accountability on how I allocate my time between multiple work projects and skills I am trying to pick up. Hence, the Productivity page exists. This not only serves as an accessible “to do” list for personal use but also as a visual indicator of whether I should be working hard to continue a productive streak, working hard to make up for slacking, or taking a breather to maintain a work-life balance. I wanted to make a visual tool that could help me make efficient decisions about how to spend my time.

To this end, I have a series of scripts that update the Productivity page every few minutes according to my current task list. The first part of this, as of the time of writing, appears as such:

example task list

Taskwarrior assigns a numeric “urgency” value to each task you create. This is calculated using variables such as when the task was created, when it’s due, what other tasks depend on it, and a user-assigned ordinal “priority”: low, medium, or high. The page’s first part shows is a list of my 10 most urgent tasks according to Taskwarrior’s algorithms.

One of my favorite aspects of Taskwarrior is how it handles recurring tasks, which I have tinted red. Currently I have “water succlulents” occurring once a week and both “water annuals” and “submit application” each day. This is helpful for setting long term goals; if I want to hold myself to submitting an application every day, I know to submit two the following day if I decide to spend one entire day working on the website. I see this feature being even more helpful for less intense, longer term goals such as practicing a language or completing free online coursework. Tasks that should not “build up,” like taking out the trash or mailing a birthday card, can be set to expire after a certain point.

2019-06-05_772x567

The second part presents two bar charts conveying the rate that I add and complete tasks through Taskwarrior. I first imagined these being histograms, aggregating the two values for each chunk of time, but I couldn’t figure out how to make ggplot2 make histograms with temporal data. I could only display individual bars for each day. For most applications this would be undesirable, as for the second chart the bars are incredibly thin. Such thin bars defeat the very purpose of histograms: to compare relative counts of a dependent variable for different values of an independent variable.  Since the original edition of this post, I did learn how to make more traditional histograms using temporal data. However, I think having the bars represent single days is better for expressing patterns of my Taskwarrior usage. In addition, if I am to take the whole accountability aspect of this project seriously, using *real* histograms for the second chart could make one day of frantic usage within an otherwise barren week appear identically to a week of healthy, consistent task management. This is exactly what the above charts indeed describe. In the future, the real-time charts on the Productivity page should should more consistent usage of Taskwarrior.

This is all accomplished using two main scripts, one in Python and the other in R. You can see the R code here and the Python code here. I have a systemd timer run a shell script that first syncs my local machine’s Taskwarrior client with my Taskserver hosted by Inthe.AM. Next, it exports the (now synced) list of tasks to a JSON file. This file is read and used by the R script to create the two charts. Finally, the Python script puts together the text portion of the page, reads the two images, and puts it all on the site.

 


One thought on “Publishing Productivity 2.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s