| Salikerrat |
Kiipeilykerrat |
Pyöräily |
Askeleet |
| 0 |
2 |
33.1 km |
210160 |
| Δ Paino |
Σ kcal |
| -1.70 kg |
-7795 kcal |
{
"description": "Askeleet",
"data": {"url" : "assets/charts/ruokadata.csv"},
"transform": [
{"filter": {"field": "pvm",
"range": [ {"year": 2025, "month": 11, "date": 1, "hours": 0},
{"year": 2025, "month": 11, "date": 30, "hours": 23, "minutes": 59}
]}
},
{"filter": {"field": "askeleet", "valid": true}},
{"calculate": "datetime(2025, 10, 1)", "as": "today"},
{"calculate": "datum.vkpv == 1 || datum.vkpv == 7", "as": "viikonloppu"}
],
"config": {"legend": {"orient": "bottom"}},
"layer": [
{
"mark": {"type": "bar"},
"encoding": {
"x": {"field": "pvm", "type": "temporal", "timeUnit": "yearmonthdate", "title": "pvm", "axis": {"labelExpr": "[timeFormat(datum.value, '%d')]", "labelAngle": 0, "labelAlign": "left", "tickCount": 30}, "scale": {"domain": [ {"year": 2025, "month": 11, "date": 1, "hours": 0}, {"year": 2025, "month": 11, "date": 30, "hours": 24, "minutes": 59}]}, "title": "Marraskuu, 2025"},
"y": {"field": "askeleet", "type": "quantitative", "scale": {"domain": [0, 25000]}, "title": "Askeleet"},"color": {"field": "viikonloppu"}
}
} ,
{
"mark": {"type": "rule", "color": "red"},
"encoding": {
"y": {"datum": 10000}
}
}
]
}
{
"description": "Kalorikulutus",
"data": {"url" : "assets/charts/ruokadata.csv"},
"transform": [
{"filter": {"field": "pvm",
"range": [ {"year": 2025, "month": 11, "date": 1, "hours": 0},
{"year": 2025, "month": 11, "date": 30, "hours": 24, "minutes": 59}
]}
},
{"calculate": "datetime(2025, 10, 1)", "as": "today"},
{"calculate": "clamp(datum.syonti-datum.kulutus-1500, 0, 10000)", "as": "erotus"},
{"calculate": "clamp(datum.syonti-datum.kulutus-1500, -10000, 0)", "as": "erotus_neg"},
{"calculate": "-datum.kulutus-1500", "as": "miinus_kulutus"}
],
"layer": [
{
"mark": {"type": "bar", "color": "lightgreen"},
"encoding": {
"x": {"field": "pvm", "type": "temporal", "timeUnit": "yearmonthdate", "title": "pvm", "axis": {"format": "%d", "labelAngle": 0, "labelAlign": "left"}, "scale": {"domain": [ {"year": 2025, "month": 11, "date": 1, "hours": 0}, {"year": 2025, "month": 11, "date": 30, "hours": 24, "minutes": 59}]}},
"y": {"field": "syonti", "type": "quantitative", "title": "Kalorit", "aggregate": "sum"}
}
},
{
"mark": {"type": "bar", "color": "lightblue"},
"encoding": {
"x": {"field": "pvm", "type": "temporal", "timeUnit": "yearmonthdate", "title": "pvm", "axis": {"labelAngle": 0}, "scale": {"domain": [ {"year": 2025, "month": 11, "date": 1, "hours": 0}, {"year": 2025, "month": 11, "date": 30, "hours": 24, "minutes": 59}]}},
"y": {"field": "miinus_kulutus", "type": "quantitative", "aggregate": "sum"}
}
},
{
"mark": {"type": "bar", "color": "darksalmon"},
"encoding": {
"x": {"field": "pvm", "type": "temporal", "timeUnit": "yearmonthdate", "title": "pvm", "axis": {"labelAngle": 0},"scale": {"domain": [ {"year": 2025, "month": 11, "date": 1, "hours": 0}, {"year": 2025, "month": 11, "date": 30, "hours": 24, "minutes": 59}]}},
"y": {"field": "erotus", "type": "quantitative", "aggregate": "sum"}
}
},
{
"mark": {"type": "bar", "color": "darkorange"},
"encoding": {
"x": {"field": "pvm", "type": "temporal", "timeUnit": "yearmonthdate", "title": "pvm", "axis": {"labelAngle": 0}, "scale": {"domain": [ {"year": 2025, "month": 11, "date": 1, "hours": 0}, {"year": 2025, "month": 11, "date": 30, "hours": 24, "minutes": 59}]}},
"y": {"field": "erotus_neg", "type": "quantitative", "aggregate": "sum"}
}
},
{
"mark": {"type": "rule", "color": "red"},
"encoding": {
"x": {"field": "today", "type": "temporal", "timeUnit": "yearmonthdate"},
"y": {"value": 0}
}
}
]
}
■Syödyt kalorit ■Kulutetut kalorit ■■Kalorien erotus
Tarkemmat tiedot
Koko kuukauden makroravinteiden keskiarvot:
| Hiilihydraatit |
Proteiinit |
Rasvat |
| 202 g /307 g |
66 g /102 g |
71 g /91 g |
|
|
|
|
{
"description": "Paino (kg)",
"data": {"url" : "assets/charts/ruokadata.csv"},
"transform": [
{"filter": {"field": "pvm",
"range": [ {"year": 2024, "month": 11, "date": 1, "hours": 0},
{"year": 2025, "month": 11, "date": 30, "hours": 23, "minutes": 59}
]}
},
{"filter": {"field": "paino", "valid": true}},
{"calculate": "datetime(2025, 10, 1)", "as": "today"},
{"calculate": "datum.vkpv == 1 || datum.vkpv == 7", "as": "viikonloppu"}
],
"config": {"legend": {"orient": "bottom"}},
"layer": [
{
"mark": {"type": "line"},
"encoding": {
"x": {"field": "pvm", "type": "temporal", "timeUnit": "yearmonthdate", "title": "pvm", "axis": {"labelExpr": "[timeFormat(datum.value, '%b'), timeFormat(datum.value, '%m') == '01' ? timeFormat(datum.value, '%Y') : '']", "labelAngle": 0, "labelAlign": "left", "tickCount": 13}, "scale": {"domain": [ {"year": 2024, "month": 11, "date": 1, "hours": 0}, {"year": 2025, "month": 11, "date": 30, "hours": 24, "minutes": 59}]}, "title": "Kuukausi"},
"y": {"field": "paino", "type": "quantitative", "scale": {"domain": [55, 85]}, "title": "Paino (kg)"}
}
}
]
}