LifeData is my project to study my productivity using the scientific method. Not productivity in general but specifically my productivity. Currently, I want to test two hypotheses:
- Sleeping earlier increases my productivity
- Taking a forced break at night increases my productivity
This repository will hold the scripts I use to log my time, analyze the data, and present it visually. Additionally, it will hold non-code documents with my findings, as well as the raw data I have gathered.
The data directory is separated by year, and each year is separated by month.
data/[YYYY]/[MM]/[YYYY_MM_DD].txt
Each file stores data in the following format.
[activityName] [activityStartTime]
activityStartTime is in the format HH_MM, 24 hour time. This is the list of all valid activities along with their activityNames (I named them like stocks just for fun) and definitions:
- sleep SLLP - sleeping at night
- biological functions BIOL - stuff like eating, brushing my teeth, chores, taking a nap
- working out WOUT - working out or playing sports
- social time SOCL - hanging out with friends online or offline (club meetings included)
- shallow work SHAL - quizzes, tests, interviews, or shallow work like watching a lecture or reading for class
- deep work DEEP - doing deep work, such as a difficult school project, a difficult coding project, or preparing for an interview
- YouTube YTBE - watching low quality YouTube videos or browsing Quora/Facebook mindlessly
- high quality fun FUNN - video games, reading, exploring the Internet, doing relaxing coding projects (like this one), watching high quality YouTube videos, but only alone
- unknown UNKN - when the activity at this time is unknown
Additionally, data/prevActivityName.txt stores a single line with the current activity. This activity will be automatically entered into the new day's file as
[prevActivityName] 00_00
once the first command is issued that day.
All datetimes are local.
To log an activity, use the command
python3 lifelog.py [activityName]
which will run the Python script logging/lifelog.py. The script will automatically gather the current local date and time and create a new file in the appropriate directory, if necessary, and append a line to the file. It will then update data/prevActivityName.txt. I recommend making a script in ~/bin which runs
python3 ~/Your/Path/To/LifeData/logging/lifelog.py "$@"
for convenience.