Skip to content

tslmy/GoQuantifyYourself

Repository files navigation

GoQuantifyYourself (Goquy)

logo

Goquy is a set of Python and R scripts that visualizes your daily activities in waterfall-like timetables. It shows you your past months (or years!) on a single image.

Goquy imports data from tracking apps such as Moves, Qbserve, Toggl, etc. Each functionality is contained in separated scripts, so you can take only what you need. :)

This is a side-project by tslmy while he is learning his way to R.

Sidenotes:

  • Goquy is pronounced as "go-kway."
  • Logo derivated from icons made by Freepik & Madebyoliver from www.flaticon.com.

[TOC]

Why This Project?

  • Because I want to see how my time is spent. This retrospect helps me optimizing my daily routine/ lifestyle.
  • Because I have these data collected. What a waste of time (and battery life) if you don't make use of these data?
  • Because native visualization from these time-tracking apps are not quite getting there.

What do I mean by "not quite getting there"?

What Can Goquy Do?

This is the timesheet built in Qbserve:

It shows events for only two hours, and it contains many details I don't care about.

What I can do is a waterfall-like timetable that spans a whole year:

  • Green: productive activities, such as word processing, coding, etc.
  • Blue: neutral activities, such as using Google, writing emails, etc.
  • Red: Distractive activities, such as watching YouTube, reading Digg, etc.

By listing my daily performance side-by-side, I am able to recognize days when I grab every minute towards deadline, as well as days when I tend to lossen up a little bit.

Besides a timetable, I'm also able to summarize how my productivities vary from day to day:

Besides sitting in front of a computer, I also spend quite a lot of time everyday commuting to university and walking around. During vacation, some days I even don't touch my laptop at all. These offline activites can also be tracked by other apps, such as Moves.

Similar to Qbserve, Moves also provides limited summaries for data it collected.

Fortunately, data from Moves can also be exported and visualized by Goquy:

The figure shown above is a record of my movements from mid June 2016 to early June 2017 (X-axis), with the Y-axis representing 24 hours in each day. Each color corresponds to a method of transportation.

This plot facilitated me recalling many events happened in the past year. You can read more about my experience here: Visualizing Daily Activities with Moves.

Other than tracking activities with timetables, Goquy can also report other interesting data about you. For example, a radar chart that of your cinematic taste:

There are more to come from Goquy as I learn my way to the R language. Stay tuned. :)

Installation

To start using GoQuantifyYourself,

  1. make sure you have these 2 applications installed:
  • Python3, which is used to prepare data for RStudio.
  • RStudio, which is for plotting.
  1. Download (or git clone) this repo, GoQuantifyYourself.
  2. Inside this folder, open a terminal and install the required Python modules by executing pip install -r requirements.txt.
  3. Everything stated below is assuming that you are working under the directory of GoQuantifyYourself.

How To Visualize Time Spend on...

… Sitting in Front of A Computer

I use Qbserve to monitor my time spent on my Mac.

How To

To make use of it, follow these steps:

  1. Open the Qbserve main window.
  2. As of version 1.63, go to ADVANCED > Export.
  3. Under "ONE TIME EXPORT", specify "Totals and timesheet", "JSON" or "JSON min." and the day(s) that you want to plot.
  4. Hit "Export", and save the file to QbserveExport/. The filenames should look like: 2017-06-01_2017-06-02.json.
  5. Run QbserveExportToTables.py, perhaps by CMD+B-ing within Sublime Text.
  6. Open TimeTable for Computer Time.r in RStudio and source this script.

… Working on Projects

Sometimes I track my work with Toggl. It not only adds more detail to the "productivity hours" identified from Qbserve, but also corrects my off-screen-but-sitting-down tasks that are recorded by neither Qbserve nor Moves.

Demo

How To

  1. Go to the export page, and, using the Export button, download reports as CSV files to the TogglExport/ folder.
  2. Run TogglExportToTables.py, perhaps by CMD+B-ing within Sublime Text.
  3. Open TimeTable for Working on Projects.r in RStudio and source this script.

… Moving Around

The iOS/Android app Moves tracks my activities.

How To

  1. Hit the big "Download" button on this Export Page.
  2. Unzip moves_export.zip and the csv.zip inside it.
  3. Copy moves_export/csv/full/storyline.csv to MovesExport/.
  4. Run MovesExportToTables.py, perhaps by CMD+B-ing within Sublime Text.
  5. Open TimeTable - Active Time.r in RStudio and source this script.

... Sleeping (or Trying to, at Least)

==TODO==

What's My Taste Like in Movies?

I label all my watched TV shows and movies with trakt.tv.

####How To

  1. Download your data by accessing https://darekkay.com/service/trakt/trakt.php?username=USERNAME. This service is provided by Darek Kay. Kudos.
  2. Unzip the trakt_backup_DATE-HERE.zip, in which there is a watched_movies.txt.
  3. Open this watched_movies.txt, copy its whole content, paste it onto this JSON-to-CSV converter, and Download the entire CSV as TraktExport/watched_movies.csv.
  4. Go to API Settings of The Movie Database (TMDb) and apply for an App Key.
  5. Save the 32-character v3 API Key in the format of tmdb = "32-character v3 API Key here" and save as keys.py.
  6. Run TraktExportToTables.py, perhaps by CMD+B-ing within Sublime Text.
  7. Open Summary for Movies.r in RStudio and source this script.

A Note for Developers

I used a virtualenv with Python3:

virtualenv -p /usr/local/bin/python3 virtualenv

so please remember to source virtualenv/bin/activate before starting to develop.

Also, remember to pip freeze > requirements.txt after installing/uninstalling Python packages.