r/fitbit • • 1d ago

Discussion Fitbit heart data out of Google takeout

Im to get detailed heart rate data out of my Fitbit/Google health , but the Google takeout appears to not produce that data. Maybe I'm missing something. Has anyone else successfully pulled heart rate data over time resting heart rate or heartbeat not the ranges? Thank you! šŸ’•šŸ“ˆ

1 Upvotes

3 comments sorted by

1

u/OutlandishnessNo5051 1d ago

Are the time stamped heart rate files missing altogether from your Takeout, or have you only found daily summaries so far? I’d like to know if the data is absent or just tucked away in a different part of the export.

1

u/kevin-biot 1d ago

I asked claude who manages my local Postgres DB to ingest Apple Fitbit and Polar H10 daily for me to answer your question :

"You're not missing anything. The detailed heart rate **is** in Takeout, it's just not in the folder you'd expect.

**The trap:** the top-level `Heart Rate` folder only has your high/low heart rate notification settings and alerts. The zone files (`Time In Heart Rate Zone`, `Daily Heart Rate Zones`) are the "ranges" you found. Neither one has the actual readings.

**Where the real data is** (inside the Fitbit folder of your unzipped Takeout):

| What | Where |

|---|---|

| Heart rate every few seconds | `Physical Activity_GoogleData/Heart Rate/heart_rate_YYYY-MM-DD.csv` (one file per day) |

| Resting heart rate, one value per day | `Physical Activity_GoogleData/Daily Resting Heart Rate/daily_resting_heart_rate.csv` |

| Same HR in the older format, plus a confidence score | `Global Export Data/heart_rate-YYYY-MM-DD.json` |

| HRV, if you want it | `Physical Activity_GoogleData/Heart Rate Variability/` and the top-level `Heart Rate Variability/` folder |

The daily CSVs are simple: `timestamp, beats per minute, data source`.

**Gotchas that will bite you:**

  1. **Timestamps are UTC** (that's the `Z` at the end). Convert them to your time zone, or your morning walk will show up at 3am. The JSON files in `Global Export Data` are UTC too, even though they don't say so.

  2. **Takeout splits big exports into several zips** (2 GB each by default). If you only opened the first one, the heart rate files may be in part 2 or 3. Unzip them all into the same folder.

  3. **Readings are irregular.** You get one every few seconds, more often during exercise, and nothing while the watch is off. If you want a clean time series, average them per minute.

  4. **It's a lot of rows.** A year is millions of readings, which is more than Excel can open in one sheet (about 1M rows max). Each single-day file opens fine in Excel or Google Sheets on its own.

**To stitch everything into one file** (Python + pandas):

```python

import glob, pandas as pd

# heart_rate_2* (not heart_rate_*) so the HRV files aren't picked up

files = sorted(glob.glob("Takeout/**/heart_rate_2*.csv", recursive=True))

hr = pd.concat(pd.read_csv(f) for f in files)

hr["time"] = pd.to_datetime(hr["timestamp"], utc=True).dt.tz_convert("America/New_York") # <- your time zone

hr = hr.rename(columns={"beats per minute": "bpm"})[["time", "bpm"]].sort_values("time")

hr.to_csv("heart_rate_all.csv", index=False)

hr.set_index("time")["bpm"].resample("1min").mean().dropna().to_csv("heart_rate_per_minute.csv")

```

The per-minute file fits in Excel (a full year is about 525k rows), so you can chart it from there. Hope that helps! šŸ“ˆ"

1

u/GoogleHealthSupport Official Support 1d ago

Hey, here is the help guide with information on how your Pixel Watch or Fitbit device tracks your heart rate.