The quantified self is the use of self-measurement tools and technologies with the aim of improving one's self knowledge. Data can be acquired through several means including:
- Smart watches
- Sleep trackers
- Fitness apps
- Mood trackers
- HR monitors
For a more detailed introduction to quantified self, you can check the following sources:
This project has multiple goals:
- Experiment quantified self.
- Reclaim ownership of my personal data.
- Develop skills in cloud technologies (GCP) and web apps (streamlit).
Data come from various sources. Ticked boxes correspond to data that can already be accessed (collectors developped).
- Steps
- Steps
- Stress
- Heart Rate
- Respiration
- Activities
- Hydration
- Daily stats
- Sleep
- Weight
- Zero: an app I used to track my period of fasting, since July 2022.
- Car
- Train
- Plane
- Podcast Addict: Podcast player that I use since 2017.
- Spotify: I have a subscription since 2017.
- My Stock Portfolio: to track my stock investments.
- ActivityWatch: tracking my computer and phone usage, since June 2022.
- Anki: a flashcard app that I have been using to learn Mandarin and English vocab for 832 days in a row (and counting!).
- Loop Habit Tracker: used to track various non automatable metrics such as coffee, alcohol, cold showers, feeling sick/headache/hot/cold.
- Personal Timeline: used to track various non automatable metrics such as place of residency, workplace, vacations etc.
All the apps I want to collect data from have a backup function. Some of them can also perform backups on a schedule. I use Autosync to synchronize these backup files onto my Google Drive account.
Note: even though most Android apps write backup files on Google Drive, these files are hidden from the user and complex to access (see here).
I chose Google Cloud Functions to deploy the code that will run on a schedule to collect data through the Garmin API.
Cloud Functions are free within certain limits: maximum 2 million invocations, 400 000 GB-seconds, 200 000 GHz-seconds of compute time and 5GB of outbound trafic per month. In other words, this is equivalent to 55 hours of compute on 1 vCPU with 2GB of memory.
In practice, most Cloud Functions can run on .167 vCPU and 256MB of memory, then the Free Tier is providing almost 2 weeks of compute 24/7. The typical workflow here will be scheduled run of API calls once a day. It will be well within the allocation of the Free Tier.
I use streamlit to build my app.
Why streamlit?
- No infrastructure to manage.
- App deployed from a Github repository within seconds after each commit.
- Focus on the logic.
- Free.
Disclaimer: I have no ties with Streamlit, these arguments are solely based on my experience working with it.