transformed_obesity_data = obesity_data.filter(function(entry){return entry.age <= 45 && entry.age >= 16}).map(item => {
var temp = Object.assign({}, item);
temp["vegetables"] = Math.floor(temp["vegetables"]);
temp["physical_activity"] = Math.floor(temp["physical_activity"]);
temp["main_meals"] = Math.floor(temp["main_meals"]);
temp["height"] = temp["height"] * 39.3701;
temp["weight"] = temp["weight"] * 2.20462;
temp["age"] = Math.floor(temp["age"])
if(temp["obesity_type"] == "Insufficient_Weight"){
temp["obesity_type"] = "1. Insufficient_Weight"
}
else if(temp["obesity_type"] == "Normal_Weight"){
temp["obesity_type"] = "2. Normal_Weight"
}
else if(temp["obesity_type"] == "Overweight_Level_I"){
temp["obesity_type"] = "3. Overweight_Level_I"
}
else if(temp["obesity_type"] == "Overweight_Level_II"){
temp["obesity_type"] = "4. Overweight_Level_II"
}
else if(temp["obesity_type"] == "Obesity_Type_I"){
temp["obesity_type"] = "5. Obesity_Type_I"
}
else if(temp["obesity_type"] == "Obesity_Type_II"){
temp["obesity_type"] = "6. Obesity_Type_II"
}
else if(temp["obesity_type"] == "Obesity_Type_III"){
temp["obesity_type"] = "7. Obesity_Type_III"
}
return temp;
});