This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why is exporting data so difficult, and different for every report?

I'm curious why every individual health report has its own time frames, export options, and date formats. It's incredibly frustrating to be able to export some data a month at a time and others a week at a time to get daily values. And at least one that I do has no export option at all. Is there any reason for this? I just want to grab my data quickly without opening endless csv files for every week. Here are some examples of the options I get below.

Pulse Ox

  • Export Options: 7 days, 4 weeks
  • Largest export with daily data: 4 weeks
  • Date format: 6/16/21

Resting Heart Rate

  • Export Options: 7 days, 4 weeks, 6 months, 1 year
  • Largest export with daily data: 7 days
  • Date format: 16-Jun

Respiration

  • Export Options: NONE
  • Largest export with daily data: NONE
  • Date format: NONE

Steps

  • Export Options: 7 days, 4 weeks, 6 months, 1 year
  • Largest export with daily data: 7 days
  • Date format: Wed

Sleep Time

  • Export Options: 7 days, 4 weeks, 6 months, 1 year
  • Largest export with daily data: 4 weeks
  • Date format: 16-Jun

If there's a better way to export your data through Connect, please let me know. I'm clicking the "Export" icon in the top right area of whatever health metric I'm on. This would be under Reports—>Health & Fitness—>Pulse Ox, for example. Thanks for any help here.

  • You can download JSON by developer tools (F12 key), more info in previous threads: export data from Connect?.

  • Wow, thank you for the help! So I followed your steps given on this thread where you edit the "fromDate" and "untilDate", Re-Send, and check the Response tab. That all worked great. That's so much easier, thank you. But once I have the results in the Response tab, I can't figure out what I can do from there. How do you download that data, or copy the results? I have no developer/coding/tech experience, sorry. I'm on Firefox's developer tools.

    Also, results are formatted with the data folded under a numerical heading, is there a way to extract just the values and date?

    0:

    - value: 6780

    - calendarDate: "2021-06-16"

  • Read more here about exporting data: https://support.garmin.com/en-US/?faq=W1TvTPW8JZ6LfJSfK512Q8

    What probably works best is to request an export of all your data. But then you need to extract the data you want from the FIT files so you will probably need to write some script to fetch the data you want from the files.

    Start here: https://www.garmin.com/en-US/account/datamanagement/

  • How do you download that data, or copy the results?

    You can select a link and choose Copy -> Copy Response to use it manually.

    Or write a script to download files, like this: #1268613, it can be modified for other links, here generic version. It only makes a download window with a file from entered link.

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/...',
        function(d)
            {
                a = document.createElement('a');
                a.download = 'FILE-NAME.json';
                a.href = window.URL.createObjectURL(new Blob([JSON.stringify(d)]));
                a.click();
            }
    );

     

    Also, results are formatted with the data folded under a numerical heading, is there a way to extract just the values and date?

    Yes, a script can print only selected values, but you can also do it using some programs with graphical interface and import option (if JSON is supported). For script, you just look how response is formatted and enter a path to element you want. So for calendarDate and value it's allMetrics.metricsMap.WELLNESS_TOTAL_STEPS:

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/userstats-service/wellness/daily/USER?fromDate=2020-01-01&untilDate=2021-01-01&metricId=29',
        function(data)
            {
                data.allMetrics.metricsMap.WELLNESS_TOTAL_STEPS.forEach(
    				function(step)
    				{
    					console.dir(step.calendarDate, step.value);
    				}
                );
            }
    );