{"id":13910555,"url":"https://github.com/hugolmn/quantified-self","last_synced_at":"2025-07-18T09:32:02.855Z","repository":{"id":116027232,"uuid":"497600964","full_name":"hugolmn/quantified-self","owner":"hugolmn","description":"Personal data collection and reporting","archived":false,"fork":false,"pushed_at":"2024-08-01T13:28:16.000Z","size":1139,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-08T00:43:13.863Z","etag":null,"topics":["api","python","quantified-self","streamlit"],"latest_commit_sha":null,"homepage":"https://quantified-self.streamlitapp.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hugolmn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-29T13:36:17.000Z","updated_at":"2024-08-01T13:28:19.000Z","dependencies_parsed_at":"2024-08-01T15:11:55.265Z","dependency_job_id":null,"html_url":"https://github.com/hugolmn/quantified-self","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugolmn%2Fquantified-self","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugolmn%2Fquantified-self/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugolmn%2Fquantified-self/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugolmn%2Fquantified-self/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugolmn","download_url":"https://codeload.github.com/hugolmn/quantified-self/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226388641,"owners_count":17617311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","python","quantified-self","streamlit"],"created_at":"2024-08-07T00:01:33.228Z","updated_at":"2024-11-25T19:31:14.599Z","avatar_url":"https://github.com/hugolmn.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Quantified Self\n- [What is Quantified Self?](#what-is-quantified-self-)\n- [Why am I doing this?](#why-am-i-doing-this)\n- [Data collected](#data-collected)\n- [Architecture](#architecture)\n\n## What is Quantified Self?\n\nThe 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:\n- Smart watches\n- Sleep trackers\n- Fitness apps\n- Mood trackers\n- HR monitors\n\nFor a more detailed introduction to quantified self, you can check the following sources:\n- [Wikipedia: Quantified Self](https://en.wikipedia.org/wiki/Quantified_self)\n- [quantifiedself.com](https://quantifiedself.com/)\n- [How Is Felix](https://howisfelix.today/?)\n\n## Why am I doing this?\nThis project has multiple goals:\n- Experiment quantified self.\n- Reclaim ownership of my personal data.\n- Develop skills in cloud technologies (GCP) and web apps (streamlit).\n\n# Data collected\nData come from various sources. Ticked boxes correspond to data that can already be accessed (collectors developped).\n## Health data\n### Google Fit: step history from 2019 until switched to Garmin\n- [x] Steps\n### Garmin: Venu 2 Plus since Aug 2022\n- [x] Steps\n- [x] Stress\n- [X] Heart Rate\n- [ ] Respiration\n- [ ] Activities\n- [x] Hydration\n- [x] Daily stats\n- [x] Sleep\n- [x] Weight\n### Intermittent Fasting\n- [x] [Zero](https://play.google.com/store/apps/details?id=com.zerofasting.zero): an app I used to track my period of fasting, since July 2022.\n\n## Transportation data\n- [x] Car\n- [x] Train\n- [x] Plane\n\n## Listening history\n- [x] [Podcast Addict](https://podcastaddict.com/): Podcast player that I use since 2017.\n- [ ] [Spotify](spotify.com/): I have a subscription since 2017.\n\n## Finance\n- [x] [My Stock Portfolio](https://play.google.com/store/apps/details?id=co.peeksoft.stocks\u0026hl=en\u0026gl=US): to track my stock investments.\n\n\n## Digital activity\n- [ ] [ActivityWatch](https://activitywatch.net/): tracking my computer and phone usage, since June 2022.\n\n## Vocabulary\n- [x] [Anki](https://play.google.com/store/apps/details?id=com.ichi2.anki): a flashcard app that I have been using to learn Mandarin and English vocab for 832 days in a row (and counting!).\n\n## Manual logging\n- [ ] [Loop Habit Tracker](https://play.google.com/store/apps/details?id=org.isoron.uhabits): used to track various non automatable metrics such as coffee, alcohol, cold showers, feeling sick/headache/hot/cold.\n- [ ] Personal Timeline: used to track various non automatable metrics such as place of residency, workplace, vacations etc.  \n\n# Architecture\n## From Phone\nAll 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](https://play.google.com/store/apps/details?id=com.ttxapps.drivesync) to synchronize these backup files onto my Google Drive account. \n\n\u003e 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](https://stackoverflow.com/questions/22832104/how-can-i-see-hidden-app-data-in-google-drive)).\n\n## From APIs\nI chose [Google Cloud Functions](https://cloud.google.com/functions) to deploy the code that will run on a schedule to collect data through the Garmin API.\n\nCloud 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. \n\nIn 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.\n\n## Streamlit App\nI use streamlit to build my [app](https://hugolmn-quantified-self-streamlit-app-75audf.streamlitapp.com/). \n\nWhy streamlit?\n- No infrastructure to manage.\n- App deployed from a Github repository within seconds after each commit.\n- Focus on the logic.\n- Free.\n\u003e Disclaimer: I have no ties with Streamlit, these arguments are solely based on my experience working with it.\n## Diagrams\n### Phone Data Flow\n![Diagram for phone data](docs/diagram/phone_data_flow.png)\n### Garmin Data Flow\n![Diagram for Garmin data](docs/diagram/garmin_data_flow.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugolmn%2Fquantified-self","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugolmn%2Fquantified-self","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugolmn%2Fquantified-self/lists"}