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

Export GC Health data

Former Member
Former Member
Hi,
Does anyone know if its possible to export the health data like weight, body fat etc...in xml file? Or xls file?
I would like to export data as one batch...last 9 months..
Please let me know.
Thanks,
Paolo
  • I'd also like to be able to get my tanita bc-1000 weight/fat/etc data out of garmin connect. Has anybody had any luck?
  • Former Member
    0 Former Member over 11 years ago
    sorry to resurect this older thread but rather than start a new one...

    I clicked on STEWA285's link above and saved my data file but I'm not sure what to do with it now (looks like it is 39 pages of a script or something an in there is my data but I can't separate it without much editing & deleting). Like the OP, I'm trying to get my weight data from the last year exported into excel since Garmin connect only keeps 1 year's worth in their database. Thanks!
  • I'm not seeing that data is culled after a year at all. I have data back to 2011, which is about the time that I started recording my information there.

    Regardless, the data that you look at when you go to that page is a representation of all of your health data in JSON format. I wrote a quick script to parse that data into a CSV file, but you have to have python installed to run it. You can find the source here. If you want to avoid installing python, you can send me your file and I can send you the output.

    Travis
  • Former Member
    0 Former Member over 11 years ago
    Hi Travis,

    I' tryed to run your script as I'm really interested to get my health data exported from Garmin Connect. I have Python installed. I put your script in a folder on my home directory. I also put the XML file from Garmin Connect into the same directory. The XML file is named "healthHistory.xml". I run the script with the option:-f healthHistory.xml But I get the error:ValueError: No JSON object could be decoded I also tried to run your script without any option, but I get this error: IOError: [Errno 2] No such file or directory: 'healthHistory.json' What am I missing?

    Thanks,

    Blaccko
  • The utility that I wrote expects your data to be in json format. That is what you get if you click link. If you have xml data, my script won't be able to load it.

    Travis
  • Former Member
    0 Former Member over 11 years ago
    Hi Travis,

    You were right, I had taken my health data from clicking another link that sent me to an XML (instead of a JSON) file. I downloaded my JSON file and the script worked. However, I got a different error this time.

    [...] python health_history_to_csv.py -f healthHistory
    Traceback (most recent call last):
    File "health_history_to_csv.py", line 50, in <module>
    main()
    File "health_history_to_csv.py", line 46, in main
    writer.writeheader(sample_list)
    AttributeError: DictWriter instance has no attribute 'writeheader'


    Could you help me out with this one please?

    Thanks again,

    Blaccko
  • My script was written to work with python 2.7.x, and you're using python 3.x. I've updated my script. You just have to download it again and it should work. I just verified with my data and a python 3.3.3 interpreter.


    Travis
  • Former Member
    0 Former Member over 9 years ago
    My script was written to work with python 2.7.x, and you're using python 3.x. I've updated my script. You just have to download it again and it should work. I just verified with my data and a python 3.3.3 interpreter.


    Travis


    Ciao Travis,
    I'm searching for your python script but seems to be unavailable or moved.

    Could you publish it again or send it via email to me (I will publish it for you). I think it will be usefull for many users as the "classic" view now is removed.

    Thanks a lot!!!

    Roberto