• Stars
    star
    1,051
  • Rank 42,098 (Top 0.9 %)
  • Language
    Ruby
  • Created about 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tracking the key metrics of my life

FxLifeSheet

Twitter: @KrauseFx


See the outcome on howisFelix.today

See the resulting work on howisFelix.today



Goals

To answer questions about my life, like

  • How does living in different cities affect other factors like fitness, productivity and happiness?
  • How does sleep affect my day, my fitness level, and happiness?
  • How does the weather, and the different seasons affect my life?
  • Are there any trends over the last few years?
  • How does computer time, work and hours in meetings affect my personal life?

Key decisions for this project:

  • Use a single database, owned and hosted by me, with all the data I've collected over the years
  • Be able to easily add and remove questions on the fly, as I learn what's beneficial to track
  • Full control of how the data is visualized
  • Works well for frequent flyers with mixed time zones
  • 100% fully open source, MIT licensed and self-hosted

This repo contains


Questions to answer

There are many questions that can be answered using this data, here are some main ones I want to look into over the next few months

Mood/Happines related:

  • How does the city I'm in influence my level of happiness?
  • How does the weather/climate influence my mood
  • How does travel affect my mood?
  • How do certain macro nutrition goals affect my mood?
  • What amount of hours of sleep have the best influence on mood?

Fitness related

  • How do certain macro goals influence my lean body mass and fat levels?
  • How does my daily kcal intake affect my social life?
  • How does alcohol affect my training and fitness progress?
  • Do more daily steps influence
    • my mood
    • the amount of audio books I'm reading
    • feeling connected with family & friends as often calling them
  • What are the areas in life that suffer while cutting (kcal deficit):
    • mood
    • stress
    • productivity
    • energy

Travel

  • What are the areas in life that suffer when I travel? Investigate:
    • fitness progress
    • productivity
    • stress
    • health
    • sleep
    • feeling connected with friends

Productivity

  • How many hours did I spend on my phone and laptop over the months?
  • Do I stick to my yearly book goals and how do other factors influence how much I'm reading?
  • Am I more productive when I set the goals for the day the night before?

Implementation

Assumptions

  • The user is in random time zones at random times and switches often, therefore the bot can't know about your daily schedule. This puts a lot of focus on averages, as it doesn't matter if a value was entered at 11pm that day, or 8am the next one, the numbers will even out, as only daily, weekly and monthly averages are considered when rendering graphs.

This repo contains the Telegram bot that is responsible for collecting the data.

There are 2 ways to input data: by the user telling the bot to ask for all the values, and by a regular interval of the bot asking you (similar to the deprecated mood bot)

Configuration

lifesheet.json

Available values for schedule:

  • eightTimesADay
  • daily
  • weekly
  • manual

User initiates data inputs

Mood

Using fourTimesADay, this will replace the mood bot

  • How are you feeling today?

Morning

/awake

This will trigger the morning questions, like:

  • Sleep duration
  • Sleep quality
  • Body weight

Evening

/asleep

This will trigger the end-of-day questions like

  • Fitness related:
    • Alcohol intake
    • Macro adherence
    • Hunger issues?
    • Fatigu/Lethargy?
    • Feel stressed?
    • Caffeine intake?
    • How healthy do you feel today?
    • Number of steps
  • Productivity related
    • Did I solve actual programming/technical problems?
  • Social
    • Felt like enough time by myself?
    • Felt like enough in control of my own time and schedule?
    • Felt like enough socializing?
    • Felt like enough going out, bars, restaurants, dancing etc.
  • Personal growth
    • Learned new skills or things?
    • Went out of my comfort zone?
    • Number of minutes of Audible
  • Other
    • Meditated
    • Note: what was the main thing I did today?
    • Boolean: Did I set goals for the next day?
    • Do you feel excited about what's ahead in the future?

Week

/week

This will trigger questions that take longer to reply, so they're only done weekly

  • Fitness related
    • Current macros
      • g of Carbs
      • g of Protein
      • g of Fat
    • Body measurements
    • Overall training adherence
    • Note: Comments on fitness
  • Productivity
    • Overall happiness with life progress of the week, do I go into the right direction?
    • Number of open Trello tasks (from howisFelix.today)
    • Number of emails in Inbox less than 5?
    • Average daily hours on computer
    • Average daily iOS screen time (minus MyFitnessPal and Strong app)
  • Social
    • Felt like spent enough time with family?
    • Had deep conversations with close friends?
  • Other
    • Did I travel, this includes every city more than 1h away, this is relevant for both fitness and productivity
    • Note of all locations I was at (cities)
    • Got out of my comfort zone & experienced/tried new things?
    • Do you feel like having to travel somewhere?
    • Do you feel like you're missing out on things?
    • Played computer games by myself
    • Played computer games with friends or family?

Telegram

Insert for available commands

skip - Skip a question that was asked
report - Generate one page report
track - Track a specific value only
mood - Track your mood
awake - First thing in the morning
asleep - Right before going to sleep
week - Once per week metrics
skip_all - Remove all queued questions

Development

Running locally

npm run dev

Debugging

After using npm run dev, open chrome://inspect to use the Chrome Dev Tools

Setup

Environment variables

.keys file or however you manage your secret env variables:

export TELEGRAM_BOT_TOKEN=""
export TELEGRAM_USER_ID=""
export TELEGRAM_CHAT_ID=""

export DATABASE_URL=""

export LIFESHEET_JSON_URL=""

Scheduler

Not using Heroku any more, in railway.app, just add this as its own service

npm run scheduler

Postgres

Create a new Postgres database, and run the SQL queries defined in db/create_tables.sql

Data Visualization

To analyze the data, check out the visual_playground subfolder https://github.com/KrauseFx/FxLifeSheet/tree/master/visual_playground

Origins

The original implementation abused Google Sheets as a database, and I used Google Data Studio to visualize the data. Both implementations ended up not working pretty quickly.

More Repositories

1

TSMessages

πŸ’Œ Easy to use and customizable messages/notifications for iOS Γ  la Tweetbot
Objective-C
4,879
star
2

detect.location

An easy way to access the user's iOS location data without actually having access
Objective-C
1,244
star
3

what-terminal-is-felix-using

πŸ’» For everyone who wants to know more about the terminal I use
511
star
4

overkill-for-mac

Stop iTunes from opening when you connect your iPhone
Swift
488
star
5

overkill

Don't let iTunes interrupt your workflow πŸ’₯🎡
Ruby
479
star
6

InAppBrowser.com

Showcasing what in-app browsers do under the hood
HTML
469
star
7

WiFiAuth

Because connecting to WiFis is still an unsolved problem πŸ˜‚
Objective-C
426
star
8

mood

Keeping track of current level of happiness
Ruby
350
star
9

steal.password

Easily get the user's Apple ID password, just by asking
330
star
10

watch.user

Every iOS app you ever gave permission to use your camera can record you any time it runs - without notice
Swift
286
star
11

markdown-to-html-github-style

Generate a simple HTML page based on a markdown file, that looks like GitHub's stylesheet
HTML
213
star
12

MajorKey

The fastest iOS app to add a note to your email inbox
Swift
186
star
13

new-mac

List of the things to do on a new Mac
Ruby
179
star
14

notes-exporter

Because GPDR exists for a reason, oh hi Apple
Ruby
162
star
15

krausefx.com

My personal blog
HTML
158
star
16

instapipe

Automatically cross-post your Instagram stories
Ruby
155
star
17

twitter-unfollow

Unfollow everybody on Twitter
Ruby
145
star
18

whereisfelix.today-backend

Yes, that's a thing
JavaScript
127
star
19

howisFelix.today

Yes, that's a thing
HTML
108
star
20

dotfiles

Learning the difference between > and >>
Shell
85
star
21

fastrockets

Visualize fastlane launches as rockets
Ruby
25
star
22

speaking

Upcoming and past speaking engagements
23
star
23

fastlane-ascii-art

πŸƒ Add some fun to your fastlane output.
Ruby
22
star
24

auxcord.org

Have a Sonos system, and are hosting a party? Let's gooo
Ruby
20
star
25

evaluation_report

The evaluation report I wrote about fastlane at university
19
star
26

trollol

GitHub pull requests - done right
14
star
27

fastlane-plugin-load_json

Loads a local JSON file and parses it
Ruby
14
star
28

Three20.swift

Three20 is a Swift library for iOS developers
11
star
29

privacy-share-button

Proof of concept: detect when an iOS user hits the share button on your website
HTML
11
star
30

rScreenshooter

Helps you create screenshots in multiple languages on different device types using UIAutomation.
Ruby
11
star
31

fastlane-plugin-clubmate

Print the Club Mate logo in your build output
Ruby
10
star
32

brewfile

Some of the brews I use
Ruby
9
star
33

trips

My upcoming trips
Ruby
9
star
34

fastlane-tunes

🎢 Play music using fastlane, because you can.
Ruby
9
star
35

telegram-advent-calendar

A simple to use Telegram Advent Calendar
Ruby
8
star
36

fastlane-plugin-ya_tu_sabes

Ya tu sabes.
Ruby
8
star
37

felix.fitness

Public fitness dashboard
7
star
38

certs

Certificates for [email protected] certs
7
star
39

tweet_collection_manager

Managing all the tweets, like a management manager
Ruby
6
star
40

fastlane-plugin-no_u

no u
Ruby
6
star
41

wealthfront-tax-info-exporter

Export all transactions (including dividends) details into a CSV file
Ruby
5
star
42

doesitrain.today

Ruby
5
star
43

resume

About me
5
star
44

engagement-enhancer

Not hitting your OKRs? Not getting enough engagement? Fix it with one little trick
HTML
4
star
45

krausefx-gem

Ruby
4
star
46

set-times

A collection of set-times for various venues
HTML
4
star
47

bot

@seriouskrausefx
Ruby
4
star
48

gwg

Geringwertige WirtschaftsgΓΌter finden
CSS
2
star
49

license_checker

Ruby
2
star
50

whichsideoftheriver.in

HTML
1
star