How to download your Noom data

Per this note, you can apparently download your Noom data here

I used this because I completely forgot what a serving was for one of my custom recipes

On Noom all I can see is that my “KetoGranola20210326” , 1 serving is 187 Cal. But if I have a trusty food scale and I want to log 149g I need to know what that is for a serving.

import json
import pandas as pd

df = pd.read_csv('/my/blah/Downloads/2021-05-02_xxxxx/xxxxx_CardioTrainer.CustomDishes.csv')

df.iloc[0]                                                                                                                 
# addedId                                                 1111111
# userId                                                 00000000
# jsonString     {"amount":1,"isDeleted":false,"manualPreciseFo...
# timeUpdated                                  2021-03-18 01:38:22
# Name: 0, dtype: object

dishes = df.jsonString.map(json.loads).tolist()

ketogranola = list(filter(lambda x: x['name'] == 'KetoGranola20210326', dishes))[0]

Looks like I can gather to total cals and total grams …

[[x['name'], x['calories'], x['extraData']['preciseAmount']] for x in ketogranola.get('ingredients')]                     
[['Roasted Pumpkin Seed', 122, 21],
 ['Sunflower Seeds', 140, 24],
 ['Chia Seed', 123, 25],
 ['Flaxseeds', 112, 21],
 ['Cashew Nuts', 129, 22],
 ['Unsweetened Coconut Flakes', 133, 20],
 ['Natural Grocers Raw Macadamia Nuts', 191, 26],
 ['Coconut Oil', 187, 21],
 ['Pecans', 175, 25]]

#
sum([x['calories'] for x in ketogranola.get('ingredients')])                                                              
# 1312

sum([x['extraData']['preciseAmount'] for x in ketogranola.get('ingredients')])                                            
# 205

Ok cool, looks like 1312/187 => 7.016042780748663 , oh and that matches this other field cool.

ketogranola['amount']                                                                                                     
# 7

So then one serving is 205/7 ==> 29.286 grams. So the 149g in my image is 149/29.3 = 5.09 servings.