I’m wrapping everything this year!
I wanted to write an entry on work. I could gush about how I like my job, and then also complain a bit about how generative AI is making parts of it annoying. But, a picture is worth a thousand words.
So, I made a temporal heat map using dayplot:
As you can see, I have a very good work-life balance. Certainly nothing to complain about. Don’t thing I’m living the CEO life, though. I teach ESL at a business school. Languages are not exactly the most important or highest paid classes.
The longer I reflected on this image, the lazier I felt. But then I remember t…
I’m wrapping everything this year!
I wanted to write an entry on work. I could gush about how I like my job, and then also complain a bit about how generative AI is making parts of it annoying. But, a picture is worth a thousand words.
So, I made a temporal heat map using dayplot:
As you can see, I have a very good work-life balance. Certainly nothing to complain about. Don’t thing I’m living the CEO life, though. I teach ESL at a business school. Languages are not exactly the most important or highest paid classes.
The longer I reflected on this image, the lazier I felt. But then I remember that for each hour of teaching there is an hour of preparation or more, plus the many hours of coordination and dealing with Teams and helping people with the FAQS of Work-lifeTM. The most frequent queries from teachers (and staff!) revolve around spreadsheets and middle-school maths. It turns out that many colleagues don’t know how to calculate an average or weight grades.
With that in mind, I feel profoundly lucky to be still doing the job I have wanted to do since I was 15 (I’ve been teaching for 19 years and 4 months!). Combine this with the fact that I get to spend loads of time with my family, and the low pay is certainly not a problem.
How I made the heat map
My personal calendar is on Mailbox.org. I interact with it using DAVx5 on my phone and Khal on my computer.
Step 1: Export the calendar to .csv
khal list -a "my calendar" \
--format "{start-date},{duration},{title}" \
--day-format "" 01.01.2025 31.12.2025 > myhours2025.csv
This outputs a .csv file that looks like this:
15.01.2025,1h,Son's sporting thing
16.01.2025,3h,WORK
17.01.2025,2h,MEETING
18.01.2025,1d,Birthday reminder
Step 2: Spreadsheet fun
Open the .csv in LibreOffice Calc, Gnumeric, or whatever.
Delete the rows that aren’t work-related.
- Convert the dates to ISO 8601 format.
- Use “Find and Replace” to change the duration (e.g.
2h 30mto02:30:00). - Multiply the duration by 24 to get the number of hours.
- Delete the description column and add a new row for the headers.
Your .csv should look something like this:
date,duration,hours
2025-04-22,02:30:00,2.50
2025-04-23,03:00:00,3.00
2025-04-24,02:50:00,2.83
Step 3: dayplot script
dayplot is a Python library for making calendar heat maps. I used the example provided the dayplot website and made a few small modifications. My script looks like this:
import matplotlib.pyplot as plt
import pandas as pd
import dayplot as dp
df = pd.read_csv("20250101-20251231.csv", low_memory=False)
fig, ax = plt.subplots(figsize=(15, 6))
dp.calendar(
week_starts_on="Monday",
dates=df["date"],
values=df["hours"],
cmap="Greens",
legend=True,
legend_bins=10,
legend_labels="auto",
start_date="2025-01-01",
end_date="2025-12-31",
ax=ax,
)
plt.savefig("2025-hours.png", dpi=300, bbox_inches="tight")
And that is all you need to do. If you want to try it, make sure you check out the different colormaps.