Our food habits campaign was about the snacks we eat throughout the day. We learned that a lot of the typical snacks are not healthy at all.

We collected the data by having us, the students, take certain amounts of food surveys of what we snack on. the reasons we ate the snack, and at what time we ate the snack.

I think I will learn which snacks we eat when we’re hungry and which snacks we eat when they are available and why.

Question: When did students eat the most expensive snacks?

food <- read.csv("food.csv")
bargraph(~when | cost, data=food, type="percent", main="higher prices in snacks")

Students ate the most expensive snacks in the morning. Comparing them all, most of the students ate their snacks in the afternoon and most of the shapes of these graphs is a left skeem. The center for $1 to < $3, $3 to < $7, and less than one is in the afternoon. The center for $7 or more is in the morning.

Most of the students eat the most expensive snacks which are in the range of $7 or more in the morning.

Question: How can the calories affect the healthy level in our snacks?

dotPlot(~calories | healthy_level, data=food, main= "calories health level")

Calories can affect our healthy level in our snacks because it determines which snacks are healthier and according to the graph most snacks are not in the healthy range.

Question: Does the amount of ingredients affect the sugar that is in a snack?

histogram(~ingredients | sugar, data=food, main="sugar affects the ingredients")

I created a graph that split the amount of sugar and ingredients to see if there is any effect on it. Something interesting I noticed is that there’s many things to look at and compare and there are all different kinds of graphs.

It does affect it because the less ingredients the less sugar there is but also the healthier the snack the less sugar it has.

LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKT3VyIGZvb2QgaGFiaXRzIGNhbXBhaWduIHdhcyBhYm91dCB0aGUgc25hY2tzIHdlIGVhdCB0aHJvdWdob3V0IHRoZSBkYXkuIFdlIGxlYXJuZWQgdGhhdCBhIGxvdCBvZiB0aGUgdHlwaWNhbCBzbmFja3MgYXJlIG5vdCBoZWFsdGh5IGF0IGFsbC4KCldlIGNvbGxlY3RlZCB0aGUgZGF0YSBieSBoYXZpbmcgdXMsIHRoZSBzdHVkZW50cywgdGFrZSBjZXJ0YWluIGFtb3VudHMgb2YgZm9vZCBzdXJ2ZXlzIG9mIHdoYXQgd2Ugc25hY2sgb24uIHRoZSByZWFzb25zIHdlIGF0ZSB0aGUgc25hY2ssIGF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