Skip to content

Latest commit

 

History

History
194 lines (133 loc) · 5.9 KB

README.md

File metadata and controls

194 lines (133 loc) · 5.9 KB

AutoJournal

Overarching goal is to provide a system that summarizes life events automatically, to augment your memory and allow for further analysis if desired.

This library is obselete, I have switched to using and developing https://github.com/kovasap/autojournal-on-gas.

Examples

Autojournal fundamentally moves personal data around between different services. The most supported place for data to end up is Google calendar. Here are some examples of what that looks like. Each block on the calendar corresponds to a single "event" that I've tracked. For sleep, this would be time asleep. For location, this would be time at a specific location, or time travelling. For computer usage, this would be active time interacting with a computer (not AFK).

An excellent example of someone else doing exactly what autojournal does can be found at https://miguelrochefort.com/blog/calendar/.

Just the location events from a trip I went on:

travelling

All events before the trip, showing usage of multiple different computers, and sleep:

computer usage

These were generated with the help of this blurring script.

Getting Started

Run:

# Required for selfspy dependency.
sudo apt-get install python-tk
poetry install

Then, run:

source $(poetry env info --path)/bin/activate

to get into the poetry virtualenv to run scripts.

You'll also need to get a credentials.json file from https://developers.google.com/calendar/quickstart/python#step_1_turn_on_the. If you already have a client ID, you can just press the download button and save the file as credentials.json.

To run once a day at 10pm, run crontab -e and add this snippet (assuming you cloned autojournal into your home directory ~/):

0 22 * * * (cd ~/autojournal; nohup poetry run gcal_aggregator --update all &> ~/autojournal.log &)

Raspberry Pi

Requires additional installs before poetry install:

sudo apt-get install python-dev libatlas-base-dev

Nomie with Couchdb

  1. Setup couchdb on your machine (for me it's a raspberry pi: https://andyfelong.com/2019/07/couchdb-2-1-on-raspberry-pi-raspbian-stretch/, https://github.com/jguillod/couchdb-on-raspberry-pi#5-script-for-running-couchdb-on-boot).
  2. Follow https://github.com/happydata/nomie-docs/blob/master/development/couchdb-setup.md

Checkout this for coding help: https://colab.research.google.com/drive/1vKOHtu1cLgky6I_4W-aFBqq6e6Hb4qBA

TODOs

Better Location Data

Could use ML to judge mode of travel better like these guys: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5620731/.

Emailed Report

Generate a report with the timeline that is already implemented, plus something like https://stackoverflow.com/questions/21604997/how-to-find-significant-correlations-in-a-large-dataset. Email this regularly.

Frontend Idea

Create a histogram-timeline using d3js that all data gets plotted on. Have checkboxes to turn on/off data series. Idea here is to plot lots of stuff (keystrokes, temperature, heartrate, stock market, etc.) and have a each way to check on whatever. Could use Joy plot for this.

Some ideas to explore in this space:

For plotting GPS logs:

This could generate an HTML report that would be automatically emailed to me every week.

GPS Logging

Uses https://gpslogger.app/. Note to make this work consistently, refer to https://gpslogger.app/#sometimestheappwillnotlogforlongperiodsoftime.

Google Photos to Calendar Syncer

When run, will make a calendar entry for every photo that exists in a given album.

Check out https://github.com/ActivityWatch/activitywatch as a potential data source.

For long events (e.g. whole day), think about making the event name long with newlines, so that you get a "graph" in the calendar UI. For example:

Temperature event:
68
68
68
68
68
68
69
70
70
70
70
...

For complex events (e.g. selfspy activity tracking), try using a word cloud type program to extract out representative words to put into the calendar event summary.

Analysis TODOs

Calculate total daily calories vs time of first meal.

Additional Things to Track

Try https://blog.luap.info/how-i-track-my-life.html.

Cron

Add this command to run every other hour, assuming you cloned this project to ~/autojournal.

0 */2 * * * ~/autojournal/run_gcal_aggregator.bash

Check out this article for ideas about other kinds of tracking on Google Calendar: https://towardsdatascience.com/andorid-activity-1ecc454c636c

Google Cloud

Set up a free tier compute engine instance. Then do https://cloud.google.com/compute/docs/gcloud-compute#default-properties and you should be able to ssh into the instance with:

gcloud compute ssh kovas

Currently a free tier instance does not have enough memory to support running this tool. I might be able to fix this by reducing memory usage by not keeping all events in memeory at once, but that would require some serious code changes.

Other Inspiration

https://vimeo.com/99571921

https://karpathy.github.io/2014/08/03/quantifying-productivity/

https://www.smartertime.com/index.html