{"id":13631544,"url":"https://github.com/mrphil007/fitbit-to-sqlite","last_synced_at":"2025-05-13T04:40:21.634Z","repository":{"id":57429786,"uuid":"293362280","full_name":"mrphil007/fitbit-to-sqlite","owner":"mrphil007","description":"Fitbit to SQLite database","archived":false,"fork":false,"pushed_at":"2021-02-08T22:01:14.000Z","size":34,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T17:09:05.710Z","etag":null,"topics":["datasette-io","fitbit","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrphil007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-06T21:11:30.000Z","updated_at":"2025-02-28T21:22:06.000Z","dependencies_parsed_at":"2022-08-26T04:42:57.601Z","dependency_job_id":null,"html_url":"https://github.com/mrphil007/fitbit-to-sqlite","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrphil007%2Ffitbit-to-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrphil007%2Ffitbit-to-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrphil007%2Ffitbit-to-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrphil007%2Ffitbit-to-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrphil007","download_url":"https://codeload.github.com/mrphil007/fitbit-to-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877369,"owners_count":21977634,"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":["datasette-io","fitbit","sqlite"],"created_at":"2024-08-01T22:02:29.412Z","updated_at":"2025-05-13T04:40:21.615Z","avatar_url":"https://github.com/mrphil007.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# fitbit-to-sqlite\n\n[![PyPI](https://img.shields.io/pypi/v/fitbit-to-sqlite.svg)](https://pypi.org/project/fitbit-to-sqlite/)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/mrphil007/fitbit-to-sqlite/blob/master/LICENSE)\n\nSave data from Fitbit Takeout to an SQLite database.\n\n## How to install\n\n    $ pip install fitbit-to-sqlite\n\nRequest your Fitbit data from the `Export Your Account Archive` section on this page https://www.fitbit.com/settings/data/export - wait for the email and download the zip file.\n\nThis tool only supports a subset of the available data sources. More will be added over time.\n\n## Resting Heart Rate\n\nYou can import data on your resting heart rate over time by using this command:\n\n    $ fitbit-to-sqlite resting-heart-rate fitbit.db MyFitbitData.zip\n\nThis will create a database file called `fitbit.db` if one does not already exist.\n\n## Distance\n\nYou can import data on the distance you have travelled each minute of each day by using the following command. Note that this also creates an analysis view called `distance_v` which converts the distances to km and miles.\n\n    $ fitbit-to-sqlite distance fitbit.db MyFitbitData.zip\n\n## Minutes Active\n\nYou can import data on your activity minutes, which Fitbit classifies into `Sedentary`, `Lightly Active`, `Moderately Active` and `Very Active` using the following command. Note that this creates separate database tables for each, but they are also combined together into a view for analysis called `minutes_active_v`.\n\n    $ fitbit-to-sqlite minutes-active fitbit.db MyFitbitData.zip\n\n## Exercise\n\nYou can import data on your exercise activities using the following command. Note that this imports a subset of all fields.\n\n    $ fitbit-to-sqlite exercise fitbit.db MyFitbitData.zip\n\n## Sleep\n\nYou can import sleep log data using the following command. Note that some fields are only populated for sleep captured in `stages`. A second table called `sleep_scores` is also created which includes the scores (out of 100) which Fitbit have started generating.\n\n    $ fitbit-to-sqlite sleep fitbit.db MyFitbitData.zip\n\n## Heart Rate Zones\n\nYou can import data on the time you have spent across the four heart rate zones which Fitbit defines based on your maximum heart rate. In the app these are usually referred to as \"Below Zones\", \"Fat Burn\", \"Cardio\" and \"Peak\" but here they are imported as `below_zone_1`, `in_zone_1`, `in_zone_2` and `in_zone_3`.\n\n    $ fitbit-to-sqlite heart-rate-zones fitbit.db MyFitbitData.zip\n\n## Browsing your data with Datasette\n\nOnce you have imported Fitbit data into an SQLite database file you can browse your data using [Datasette](https://github.com/simonw/datasette). Install Datasette like so:\n\n    $ pip install datasette\n\nNow browse your data by running this and then visiting `http://localhost:8001/`\n\n    $ datasette fitbit.db\n\n## Thanks\n\nThis package is heavily inspired by the interesting work on [Personal Analytics](https://simonwillison.net/2019/Oct/7/dogsheep/) which Simon\nWillison has been doing [here](https://dogsheep.github.io/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrphil007%2Ffitbit-to-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrphil007%2Ffitbit-to-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrphil007%2Ffitbit-to-sqlite/lists"}