Public
Edited
Apr 14, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`## Calories burned: ${cal_func(weight_kg, height_cm, steps, 2, 2.8).toFixed(0)} kcal in ${time_func( height_cm, steps, 2).toFixed(0)} minutes to ${cal_func(weight_kg, height_cm, steps, 4, 5).toFixed(0)} kcal in ${time_func(height_cm, steps, 4).toFixed(0)} minutes.
<hr>
Calculations:`
Insert cell
cal_func = function(weight, height, steps, speed, MET) {
const time_m = time_func(height, steps, speed)
return time_m * MET * 3.5 * weight / 200
}
Insert cell
time_func = function(height, steps, speed) {
const height_m = height / 100
const stride_m = height_m * 0.414
const distance_m = stride_m * steps
const speed_kph = speed * 1.609
const time_h = distance_m / (speed_kph * 1000)
return time_h * 60
}
Insert cell
import {weight_input, weight_kg, height_input, height_cm, viewof steps} from "59248563da107bc7"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more