Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fitbit Ontology #479

Open
ClementBrohon opened this issue Jun 26, 2017 · 1 comment
Open

Fitbit Ontology #479

ClementBrohon opened this issue Jun 26, 2017 · 1 comment
Assignees

Comments

@ClementBrohon
Copy link

ClementBrohon commented Jun 26, 2017

Activities

{
    "activities":[
        {
            "activityId":51007,
            "activityParentId":90019,
            "calories":230,
            "description":"7mph",
            "distance":2.04,
            "duration":1097053,
            "hasStartTime":true,
            "isFavorite":true,
            "logId":1154701,
            "name":"Treadmill, 0% Incline",
            "startTime":"00:25",
            "steps":3783
        }
    ],
    "goals":{
        "caloriesOut":2826,
        "distance":8.05,
        "floors":150,
        "steps":10000
     },
    "summary":{
        "activityCalories":230,
        "caloriesBMR":1913,
        "caloriesOut":2143,
        "distances":[
            {"activity":"tracker", "distance":1.32},
            {"activity":"loggedActivities", "distance":0},
            {"activity":"total","distance":1.32},
            {"activity":"veryActive", "distance":0.51},
            {"activity":"moderatelyActive", "distance":0.51},
            {"activity":"lightlyActive", "distance":0.51},
            {"activity":"sedentaryActive", "distance":0.51},
            {"activity":"Treadmill, 0% Incline", "distance":3.28}
        ],
        "elevation":48.77,
        "fairlyActiveMinutes":0,
        "floors":16,
        "lightlyActiveMinutes":0,
        "marginalCalories":200,
        "sedentaryMinutes":1166,
        "steps":0,
        "veryActiveMinutes":0
    }
}

** For future evolutions, I see that it is possible to program our own exercises (for example "Run at more than 10km for 10 minutes"). For now I just take the info and send it, but it can be important for the ontology **

Weight

{
    "weight":[
        {
            "bmi":23.57,
            "date":"2015-03-05",
            "logId":1330991999000,
            "time":"23:59:59",
            "weight":73,
            "source": "API"
        }
}

I can also define goal for future evolutions

Food

getFood

{
    "foods":[
        {
            "isFavorite":<value>,
            "logDate":<value>,
            "logId":<value>,
            "loggedFood":{
                "accessLevel":<value>,
                "amount":<value>,
                "brand":<value>,
                "calories":<value>,
                "foodId":<value>,
                "mealTypeId":<value>,
                "locale":<value>,
                "name":<value>,
                "unit":{"id":<value>,"name":<value>,"plural":<value>},
                "units":[<value>,..,<value>]
            },
            "nutritionalValues":{
                "calories":<value>,
                "carbs":<value>,
                "fat":<value>,
                "fiber":<value>,
                "protein":<value>,
                "sodium":<value>
            }
        },
        <...>
    ],
    "summary":{
        "calories":<value>,
        "carbs":<value>,
        "fat":<value>,
        "fiber":<value>,
        "protein":<value>,
        "sodium":<value>,
        "water":<value>
    },
    "goals":{
        "calories":<value>,
        "estimatedCaloriesOut":<value>
    }
}

GetWater

{
    "summary":{
       "water":800;
    },
    "water":[
        {"amount":500,"logId":950},
        {"amount":200,"logId":951},
        {"amount":100,"logId":952}
    ]
}

**For each, water and food I can also ask the goal. I don't know if it's very usefull (I push every day values, the goal is a value that changes little. But maybe for a future service.
There are loads of useful information that behaves in the same way: His favorite meals, the local dishes he accepts (Mexican, Canadian ...), frequent meals. We can also create our own recipes or search for food information in the fitbit database.

Are the last meal recipes eaten interesting?**

Heart Rate

{
    "activities-heart": [
        {
            "dateTime": "2015-08-04",
            "value": {
                "customHeartRateZones": [],
                "heartRateZones": [
                    {
                        "caloriesOut": 740.15264,
                        "max": 94,
                        "min": 30,
                        "minutes": 593,
                        "name": "Out of Range"
                    },
                    {
                        "caloriesOut": 249.66204,
                        "max": 132,
                        "min": 94,
                        "minutes": 46,
                        "name": "Fat Burn"
                    },
                    {
                        "caloriesOut": 0,
                        "max": 160,
                        "min": 132,
                        "minutes": 0,
                        "name": "Cardio"
                    },
                    {
                        "caloriesOut": 0,
                        "max": 220,
                        "min": 160,
                        "minutes": 0,
                        "name": "Peak"
                    }
                ],
                "restingHeartRate": 68
            }
        }
    ]
}

Sleep

{
    "sleep": [
        {
            "dateOfSleep": "2017-04-02",
            "duration": <value in milliseconds>,
            "efficiency": <value>,
            "isMainSleep": true,
            "levels": {
                "summary": {
                    "deep": {
                        "count": <value>,
                        "minutes": <value>,
                        "thirtyDayAvgMinutes": <value>
                    },
                    "light": {
                        "count": <value>,
                        "minutes": <value>,
                        "thirtyDayAvgMinutes": <value>
                    },
                    "rem": {
                        "count": <value>,
                        "minutes": <value>,
                        "thirtyDayAvgMinutes": <value>
                    },
                    "wake": {
                        "count": <value>,
                        "minutes": <value>,
                        "thirtyDayAvgMinutes": <value>
                    }
                },
                "data": [
                    {
                        "datetime": "2017-04-01T23:58:30.000",
                        "level": "wake",
                        "seconds": <value>
                    },
                    {
                        "datetime": "2017-04-02T00:16:30.000",
                        "level": "rem",
                        "seconds": <value>
                    },
                    <...>
                ],
                "shortData": [
                    {
                        "datetime": "2017-04-02T05:58:30.000",
                        "level": "wake",
                        "seconds": <value>
                    },
                    <...>
                ]
            },
            "logId": <value>,
            "minutesAfterWakeup": <value>,
            "minutesAsleep": <value>,
            "minutesAwake": <value>,
            "minutesToFallAsleep": <value>, // this is generally 0 for autosleep created sleep logs
            "startTime": "2017-04-01T23:58:30.000",
            "timeInBed": <value in minutes>,
            "type": "stages"
        },
        {
            "dateOfSleep": "2017-04-02",
            "duration": <value in milliseconds>,
            "efficiency": <value>,
            "isMainSleep": false,
            "levels": {
                "data": [
                    {
                        "dateTime": "2017-04-02T12:06:00.000",
                        "level": "asleep",
                        "seconds": <value>
                    },
                    {
                        "dateTime": "2017-04-02T12:13:00.000",
                        "level": "restless",
                        "seconds": <value>
                    },
                    {
                        "dateTime": "2017-04-02T12:14:00.000",
                        "level": "awake",
                        "seconds": <value>
                    },
                    <...>
                ],
                "summary": {
                    "asleep": {
                        "count": 0, // this field should not be used for "asleep" summary info
                        "minutes": <value>
                    },
                    "awake": {
                        "count": <value>,
                        "minutes": <value>
                    },
                    "restless": {
                        "count": <value>,
                        "minutes": <value>
                    }
                }
            },
            "logId": <value>,
            "minutesAfterWakeup": <value>,
            "minutesAsleep": <value>,
            "minutesAwake": <value>,
            "minutesToFallAsleep": <value>, // this is generally 0 for autosleep created sleep logs
            "startTime": "2017-04-02T12:06:00.000",
            "timeInBed": <value in minutes>,
            "type": "classic"
        }
    ],
    "summary": {
        "totalMinutesAsleep": <value>,
        "totalSleepRecords": 2,
        "totalTimeInBed": <value in minutes>
    }
}

User

Data about the user like his city, avatar... I think not realy usefull

@amedranogil
Copy link
Member

A step counter ontology has been requested some time ago. This might be a great chance to finally have something useful in that regard.
Maybe we can use this Activity tracking ontology as basis for the Activity information (Step counting, sleeping patterns, nutritional intake): http://www.productontology.org/doc/Activity_tracker

There was an app called "nutritional advisor", some time back; so in regards to food and drink consumtion there might already be something.

As for the biomedical tracking (Weight and Heart rate) there is already the ont.measurement.health (and ont.profile.health) that already tackles the management of this data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants