Today I decided to start analyzing the time use data I’ve kept with Timewarrior. Since this is a daily blog, I’ll be posting about it in parts.

First, I ran timew export 2021-01-01 - 2021-12-31 > timewarrior-export.json.

This gives me a happy little JSON file with sequence number, start time, end time, and tags associated with a particular time entry.

I started Jupyter by entering jupyter notebook into my shell, then created a Python3 notebook from the menu.

After import pandas as pd, I ran df = pd.read_json("timewarrior-export.txt"), which processes sufficiently flat JSON files into Pandas dataframes (this one is sufficiently flat).

The issue I now need to solve is how to take time entries with multiple tags (eating, watching) and split them into multiple entries with the same start and end times. This will be necessary to run correllations between time spent on A and time spent on B in a given day.