Skip to content

Studying my own productivity with the scientific method

Notifications You must be signed in to change notification settings

wangpatrick57/lifedata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to LifeData

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:

  1. Sleeping earlier increases my productivity
  2. 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.

Data Files

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:

  1. sleep SLLP - sleeping at night
  2. biological functions BIOL - stuff like eating, brushing my teeth, chores, taking a nap
  3. working out WOUT - working out or playing sports
  4. social time SOCL - hanging out with friends online or offline (club meetings included)
  5. shallow work SHAL - quizzes, tests, interviews, or shallow work like watching a lecture or reading for class
  6. deep work DEEP - doing deep work, such as a difficult school project, a difficult coding project, or preparing for an interview
  7. YouTube YTBE - watching low quality YouTube videos or browsing Quora/Facebook mindlessly
  8. 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
  9. 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.

Logging Activities

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.

About

Studying my own productivity with the scientific method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages